summaryrefslogtreecommitdiff
path: root/fs/bcachefs/move.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-07-21 17:12:39 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:43 -0400
commit74ed7e560b794369adf87e0d310453bc78f4b273 (patch)
tree4ba81323571e27cdb7bdf3d6f372132d86418035 /fs/bcachefs/move.c
parent3d080aa52f6c1bf10734ec4464a2204cbbd80671 (diff)
downloadlwn-74ed7e560b794369adf87e0d310453bc78f4b273.tar.gz
lwn-74ed7e560b794369adf87e0d310453bc78f4b273.zip
bcachefs: Don't let copygc buckets be stolen by other threads
And assorted other copygc fixes. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/move.c')
-rw-r--r--fs/bcachefs/move.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c
index 6a43a89e0fdd..b5970f09609a 100644
--- a/fs/bcachefs/move.c
+++ b/fs/bcachefs/move.c
@@ -248,6 +248,7 @@ int bch2_migrate_write_init(struct bch_fs *c, struct migrate_write *m,
if (m->data_opts.btree_insert_flags & BTREE_INSERT_USE_RESERVE) {
m->op.alloc_reserve = RESERVE_MOVINGGC;
+ m->op.flags |= BCH_WRITE_ALLOC_NOWAIT;
} else {
/* XXX: this should probably be passed in */
m->op.flags |= BCH_WRITE_ONLY_SPECIFIED_DEVS;