Commit 10d9f7d2 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: ec: fall back to creating new stripes for copygc

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 57c723de
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment