summaryrefslogtreecommitdiff
path: root/libbcachefs/str_hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/str_hash.h')
-rw-r--r--libbcachefs/str_hash.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbcachefs/str_hash.h b/libbcachefs/str_hash.h
index 55a4ac7b..f645a454 100644
--- a/libbcachefs/str_hash.h
+++ b/libbcachefs/str_hash.h
@@ -34,6 +34,7 @@ bch2_str_hash_opt_to_type(struct bch_fs *c, enum bch_str_hash_opts opt)
struct bch_hash_info {
u8 type;
+ struct unicode_map *cf_encoding;
/*
* For crc32 or crc64 string hashes the first key value of
* the siphash_key (k0) is used as the key.
@@ -47,6 +48,9 @@ bch2_hash_info_init(struct bch_fs *c, const struct bch_inode_unpacked *bi)
/* XXX ick */
struct bch_hash_info info = {
.type = INODE_STR_HASH(bi),
+#ifdef CONFIG_UNICODE
+ .cf_encoding = !!(bi->bi_flags & BCH_INODE_casefolded) ? c->cf_encoding : NULL,
+#endif
.siphash_key = { .k0 = bi->bi_hash_seed }
};