]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bcachefs: Don't strip rebalance_opts from indirect extents
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 10 May 2025 15:30:21 +0000 (11:30 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 14 May 2025 21:05:19 +0000 (17:05 -0400)
Fix bch2_bkey_clear_needs_rebalance(): indirect extents are never
supposed to have bch_extent_rebalance stripped off, because that's how
we get the IO path options when we don't have the original inode it
belonged to.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/rebalance.c

index 4ccdfc1f34aa3559fb65c93d709110a80a3e4030..623273556aa978a77fbd5b0a2942869ca3cfa8db 100644 (file)
@@ -309,7 +309,7 @@ static int bch2_bkey_clear_needs_rebalance(struct btree_trans *trans,
                                           struct btree_iter *iter,
                                           struct bkey_s_c k)
 {
-       if (!bch2_bkey_rebalance_opts(k))
+       if (k.k->type == KEY_TYPE_reflink_v || !bch2_bkey_rebalance_opts(k))
                return 0;
 
        struct bkey_i *n = bch2_bkey_make_mut(trans, iter, &k, 0);