summaryrefslogtreecommitdiff
path: root/libbcachefs/str_hash.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-02-20 15:42:51 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2025-02-20 15:52:55 -0500
commitdd1a882d17d6302bd3f48f87aec4018b75749de6 (patch)
treef9bf12bc5cf2e54eaa10da4a0a903464c1cf2b73 /libbcachefs/str_hash.h
parent3e15e96cb9c90cca6f7fa3465697933c53f51228 (diff)
Update bcachefs sources to 9736cbbc5cc3 bcachefs: bs > ps support
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
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 }
};