From 8ff92a9e4e49fc1fa01e8d23462097ccbe90e3b6 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 19 Jan 2025 13:11:24 -0500 Subject: [PATCH] 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 --- fs/bcachefs/io_read.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/bcachefs/io_read.c b/fs/bcachefs/io_read.c index 829a4f1b2f03..7a66feb1c011 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; -- 2.50.1