diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-10 18:00:10 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:56 -0400 |
commit | 3f5d3fb4025a7196e75250ecee8b6478f086a145 (patch) | |
tree | 0916bb29c8d3d223f08e7fd6f214a6e9e3a7018e /fs/bcachefs/move.c | |
parent | 5bf9db0179c3eb1b7d9f9b3c3fe0d30f1364bb1f (diff) |
bcachefs: evacuate_bucket() no longer moves cached ptrs
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/move.c')
-rw-r--r-- | fs/bcachefs/move.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c index 681d134f2e43..de10f388b8d3 100644 --- a/fs/bcachefs/move.c +++ b/fs/bcachefs/move.c @@ -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++; } |