aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/block_processor/internal.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-23 11:32:04 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-23 11:39:52 +0100
commit947670d992454033a13c70e36a53a2ac10b3d6ad (patch)
tree292c1d8b9dc03a980f8085b0ca0c9cd6e41f7e03 /lib/sqfs/block_processor/internal.h
parentcb8b925130c0ff5cdb445ad36fde47ca4f58e645 (diff)
block processor: Re-implement exact fragment matching
In the hash-table equals callback, if the hash and size match, do an exact, byte-for-byte comparison of the fragment in question. The fragment can either be in a fragment block that is in-flight (for which we have the in-flight list), in the current, unfinished fragment block, or it can be on disk. In the later case, the fragment block is resolved through the fragment table and read back from disk into a scratch buffer and decompressed. After that, the fragment is checked for byte-for-byte equality with the one we resolved through the hash table. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/block_processor/internal.h')
-rw-r--r--lib/sqfs/block_processor/internal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqfs/block_processor/internal.h b/lib/sqfs/block_processor/internal.h
index 72e862a..1c184c5 100644
--- a/lib/sqfs/block_processor/internal.h
+++ b/lib/sqfs/block_processor/internal.h
@@ -99,7 +99,12 @@ struct sqfs_block_processor_t {
sqfs_u32 io_seq_num;
sqfs_u32 io_deq_seq_num;
+ sqfs_block_t *current_frag;
+ sqfs_block_t *cached_frag_blk;
sqfs_block_t *fblk_in_flight;
+ int fblk_lookup_error;
+
+ sqfs_u8 scratch[];
};
SQFS_INTERNAL int enqueue_block(sqfs_block_processor_t *proc,