From: Kent Overstreet Date: Sun, 19 Jan 2025 18:11:24 +0000 (-0500) Subject: bcachefs: Promotes should use BCH_WRITE_only_specified_devs X-Git-Tag: v6.15-rc1~146^2~158 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ff92a9e4e49fc1fa01e8d23462097ccbe90e3b6;p=thirdparty%2Flinux.git bcachefs: Promotes should use BCH_WRITE_only_specified_devs 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 --- diff --git a/fs/bcachefs/io_read.c b/fs/bcachefs/io_read.c index 829a4f1b2f039..7a66feb1c011e 100644 --- a/fs/bcachefs/io_read.c +++ b/fs/bcachefs/io_read.c @@ -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;