Commit 419fc65f authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Fix hash_check_key()

On hash collision when we have to check for duplicates or incorrect
hash value, we weren't specifying a snapshot ID to iterate with.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent b8c5b16f
......@@ -821,7 +821,7 @@ static int hash_check_key(struct btree_trans *trans,
goto bad_hash;
for_each_btree_key_norestart(trans, iter, desc.btree_id,
POS(hash_k.k->p.inode, hash),
SPOS(hash_k.k->p.inode, hash, hash_k.k->p.snapshot),
BTREE_ITER_SLOTS, k, ret) {
if (bkey_eq(k.k->p, hash_k.k->p))
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment