diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-10 16:46:24 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:56 -0400 |
commit | 10d9f7d2853d5e4c6f21a0dc96f6e98c2d0828e7 (patch) | |
tree | 38376fd6e158c672f869fc437b94b5c62a7470e9 /fs/bcachefs | |
parent | 57c723de7d4c592ab3a38e77d414d0021e8483ee (diff) | |
download | linux-stable-10d9f7d2853d5e4c6f21a0dc96f6e98c2d0828e7.tar.gz linux-stable-10d9f7d2853d5e4c6f21a0dc96f6e98c2d0828e7.tar.bz2 linux-stable-10d9f7d2853d5e4c6f21a0dc96f6e98c2d0828e7.zip |
bcachefs: ec: fall back to creating new stripes for copygc
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs')
-rw-r--r-- | fs/bcachefs/ec.c | 8 |
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; |