aboutsummaryrefslogtreecommitdiff
path: root/include/hash_table.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-01-14 04:38:33 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-01-19 10:45:59 +0100
commit4249e123d321650050259fb602f06497519077d0 (patch)
tree9638c0fb1d5735d2e3b0d044e991641754e97d36 /include/hash_table.h
parent854119c62621e017c13be5192a9494c0eea2fe2f (diff)
libsqfs: block processor: backport exact fragment matching
This commit is an amalgamation of the commits on master that implement exact matching of fragment blocks during deduplication. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/hash_table.h')
-rw-r--r--include/hash_table.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/hash_table.h b/include/hash_table.h
index 6f377c9..813e059 100644
--- a/include/hash_table.h
+++ b/include/hash_table.h
@@ -42,9 +42,10 @@ struct hash_entry {
struct hash_table {
struct hash_entry *table;
- sqfs_u32 (*key_hash_function)(const void *key);
- bool (*key_equals_function)(const void *a, const void *b);
+ sqfs_u32 (*key_hash_function)(void *user, const void *key);
+ bool (*key_equals_function)(void *user, const void *a, const void *b);
const void *deleted_key;
+ void *user;
sqfs_u32 size;
sqfs_u32 rehash;
sqfs_u64 size_magic;
@@ -56,8 +57,8 @@ struct hash_table {
};
SQFS_INTERNAL struct hash_table *
-hash_table_create(sqfs_u32 (*key_hash_function)(const void *key),
- bool (*key_equals_function)(const void *a,
+hash_table_create(sqfs_u32 (*key_hash_function)(void *user, const void *key),
+ bool (*key_equals_function)(void *user, const void *a,
const void *b));
SQFS_INTERNAL struct hash_table *