diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/btree_iter.h | 7 | ||||
-rw-r--r-- | fs/bcachefs/str_hash.h | 12 |
2 files changed, 17 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_iter.h b/fs/bcachefs/btree_iter.h index d046ad71a7ba..04e0ae00d869 100644 --- a/fs/bcachefs/btree_iter.h +++ b/fs/bcachefs/btree_iter.h @@ -288,6 +288,11 @@ static __always_inline u64 __btree_iter_id(void) ret |= _RET_IP_ & U32_MAX; ret <<= 32; ret |= _THIS_IP_ & U32_MAX; +#if 0 + pr_info("iter_id %llx, %pf:%pf", ret, + (void *) _RET_IP_, + (void *) _THIS_IP_); +#endif return ret; } @@ -313,6 +318,8 @@ int bch2_trans_unlock(struct btree_trans *); void bch2_trans_init(struct btree_trans *, struct bch_fs *); int bch2_trans_exit(struct btree_trans *); +#define TRACE_TRANSACTION_RESTARTS + #ifdef TRACE_TRANSACTION_RESTARTS #define bch2_trans_begin(_trans) \ do { \ 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; |