Commit d59ca7e8 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: verify_bucket_evacuated() -> set_btree_iter_dontneed()

This should help with excessive 'would deadlock' transaction restarts.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 330970c2
......@@ -629,6 +629,8 @@ void bch2_verify_bucket_evacuated(struct btree_trans *trans, struct bpos bucket,
u64 bp_offset = 0;
int ret;
bch2_trans_begin(trans);
bch2_trans_iter_init(trans, &iter, BTREE_ID_alloc,
bucket, BTREE_ITER_CACHED);
again:
......@@ -649,6 +651,7 @@ void bch2_verify_bucket_evacuated(struct btree_trans *trans, struct bpos bucket,
}
}
set_btree_iter_dontneed(&iter);
bch2_trans_iter_exit(trans, &iter);
return;
failed_to_evacuate:
......
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