]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bcachefs: Promotes should use BCH_WRITE_only_specified_devs
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 19 Jan 2025 18:11:24 +0000 (13:11 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 15 Mar 2025 01:02:11 +0000 (21:02 -0400)
Promotes, like most other internal moves, should only go to the
specified target and not fall back to allocating from the full
filesystem.

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

index 829a4f1b2f0393a84ebc3acb0cbee8f5ea5c9d9e..7a66feb1c011e486601a1e7b36fc9770a65c4fac 100644 (file)
@@ -194,6 +194,7 @@ static struct bch_read_bio *__promote_alloc(struct btree_trans *trans,
                update_opts.target = orig->opts.promote_target;
                update_opts.extra_replicas = 1;
                update_opts.write_flags = BCH_WRITE_alloc_nowait|BCH_WRITE_cached;
+               update_opts.write_flags |= BCH_WRITE_only_specified_devs;
        } else {
                update_opts.target = orig->opts.foreground_target;