bcachefs: evacuate_bucket() no longer moves cached ptrs

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2023-03-10 18:00:10 -05:00
parent 5bf9db0179
commit 3f5d3fb402
1 changed files with 6 additions and 1 deletions

View File

@ -758,8 +758,13 @@ int __bch2_evacuate_bucket(struct btree_trans *trans,
data_opts.rewrite_ptrs = 0;
bkey_for_each_ptr(bch2_bkey_ptrs_c(k), ptr) {
if (ptr->dev == bucket.inode)
if (ptr->dev == bucket.inode) {
data_opts.rewrite_ptrs |= 1U << i;
if (ptr->cached) {
bch2_trans_iter_exit(trans, &iter);
goto next;
}
}
i++;
}