summaryrefslogtreecommitdiff
path: root/lib/sqfs/blk_proc/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs/blk_proc/internal.h')
-rw-r--r--lib/sqfs/blk_proc/internal.h37
1 files changed, 34 insertions, 3 deletions
diff --git a/lib/sqfs/blk_proc/internal.h b/lib/sqfs/blk_proc/internal.h
index 85c7783..b5af751 100644
--- a/lib/sqfs/blk_proc/internal.h
+++ b/lib/sqfs/blk_proc/internal.h
@@ -6,7 +6,11 @@
#include "sqfs/block_processor.h"
#include "sqfs/compress.h"
+#include "sqfs/inode.h"
+#include "sqfs/table.h"
#include "sqfs/error.h"
+#include "sqfs/data.h"
+#include "sqfs/io.h"
#include "util.h"
#include <string.h>
@@ -16,6 +20,21 @@
#include <pthread.h>
#endif
+
+#define MK_BLK_SIG(chksum, size) \
+ (((uint64_t)(size) << 32) | (uint64_t)(chksum))
+
+#define BLK_SIZE(sig) ((sig) >> 32)
+
+#define INIT_BLOCK_COUNT (128)
+
+
+typedef struct {
+ uint64_t offset;
+ uint64_t signature;
+} blk_info_t;
+
+
#ifdef WITH_PTHREAD
typedef struct {
sqfs_block_processor_t *shared;
@@ -46,18 +65,30 @@ struct sqfs_block_processor_t {
uint32_t dequeue_id;
unsigned int num_workers;
- sqfs_block_cb cb;
- void *user;
int status;
size_t max_backlog;
+ size_t devblksz;
+ sqfs_file_t *file;
+
+ sqfs_fragment_t *fragments;
+ size_t num_fragments;
+ size_t max_fragments;
+
+ uint64_t start;
+
+ size_t file_start;
+ size_t num_blocks;
+ size_t max_blocks;
+ blk_info_t *blocks;
+ sqfs_compressor_t *cmp;
+
/* used only by workers */
size_t max_block_size;
#ifdef WITH_PTHREAD
compress_worker_t *workers[];
#else
- sqfs_compressor_t *cmp;
uint8_t scratch[];
#endif
};