summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/ec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/ec.c')
-rw-r--r--fs/bcachefs/ec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c
index 4adbfd4855f7..1fd68d44b90f 100644
--- a/fs/bcachefs/ec.c
+++ b/fs/bcachefs/ec.c
@@ -1706,6 +1706,14 @@ struct ec_stripe_head *bch2_ec_stripe_head_get(struct btree_trans *trans,
if (waiting || !cl || ret != -BCH_ERR_stripe_alloc_blocked)
goto err;
+ if (reserve == RESERVE_movinggc) {
+ ret = new_stripe_alloc_buckets(trans, h, reserve, NULL) ?:
+ __bch2_ec_stripe_head_reserve(trans, h);
+ if (ret)
+ goto err;
+ goto allocate_buf;
+ }
+
/* XXX freelist_wait? */
closure_wait(&c->freelist_wait, cl);
waiting = true;