diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-07-15 00:13:51 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-07-15 00:24:33 -0400 |
commit | 6f72943611d05d7a14975d963f06d58a74353260 (patch) | |
tree | 82e47030901a0c5fc6fbc4b36f78d493a2ea7f74 /fs/bcachefs/str_hash.h | |
parent | a3fbe6ed4ed3affa9ddc0cb89f44b2465d3ff97c (diff) |
debug crapbcachefs-locking
Diffstat (limited to 'fs/bcachefs/str_hash.h')
-rw-r--r-- | fs/bcachefs/str_hash.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/bcachefs/str_hash.h b/fs/bcachefs/str_hash.h index b23d266dfd10..3f04f251fc66 100644 --- a/fs/bcachefs/str_hash.h +++ b/fs/bcachefs/str_hash.h @@ -99,8 +99,8 @@ static inline void bch2_str_hash_update(struct bch_str_hash_ctx *ctx, } } -static inline u64 bch2_str_hash_end(struct bch_str_hash_ctx *ctx, - const struct bch_hash_info *info) +static inline u64 __bch2_str_hash_end(struct bch_str_hash_ctx *ctx, + const struct bch_hash_info *info) { switch (info->type) { case BCH_STR_HASH_CRC32C: @@ -114,6 +114,14 @@ static inline u64 bch2_str_hash_end(struct bch_str_hash_ctx *ctx, } } +static inline u64 bch2_str_hash_end(struct bch_str_hash_ctx *ctx, + const struct bch_hash_info *info) +{ + u64 ret = __bch2_str_hash_end(ctx, info); + + return (ret & 7) << 32; +} + struct bch_hash_desc { enum btree_id btree_id; u8 key_type; |