]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bcachefs: Setting foreground_target at runtime now triggers rebalance
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 13 Mar 2025 04:55:23 +0000 (00:55 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 24 Mar 2025 13:50:35 +0000 (09:50 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/sysfs.c

index 4c5b585041bea1ccbff06277e2da1faf131c2508..b01b2ae87051451b8f186c12af2590c4dd533974 100644 (file)
@@ -650,6 +650,7 @@ static ssize_t sysfs_opt_store(struct bch_fs *c,
 
        if (v &&
            (id == Opt_background_target ||
+            (id == Opt_foreground_target && !c->opts.background_target) ||
             id == Opt_background_compression ||
             (id == Opt_compression && !c->opts.background_compression)))
                bch2_set_rebalance_needs_scan(c, 0);