summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/ec.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-02-25 02:22:49 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:56 -0400
commit7635e1a6d6740ce76e1c2204f9237f01c98153b3 (patch)
tree4c4da48cc475344da4ab46bbc7afe509bf4a5d52 /fs/bcachefs/ec.c
parente53d03fe39f1458065ddb5f7309ade066ba6fb95 (diff)
downloadlinux-stable-7635e1a6d6740ce76e1c2204f9237f01c98153b3.tar.gz
linux-stable-7635e1a6d6740ce76e1c2204f9237f01c98153b3.tar.bz2
linux-stable-7635e1a6d6740ce76e1c2204f9237f01c98153b3.zip
bcachefs: Rework open bucket partial list allocation
Now, any open_bucket can go on the partial list: allocating from the partial list has been moved to its own dedicated function, open_bucket_add_bucets() -> bucket_alloc_set_partial(). In particular, this means that erasure coded buckets can safely go on the partial list; the new location works with the "allocate an ec bucket first, then the rest" logic. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/ec.c')
-rw-r--r--fs/bcachefs/ec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c
index e9470c06b1fa..62bfde035f78 100644
--- a/fs/bcachefs/ec.c
+++ b/fs/bcachefs/ec.c
@@ -1451,9 +1451,9 @@ static int new_stripe_alloc_buckets(struct btree_trans *trans, struct ec_stripe_
&devs,
h->s->nr_parity,
&nr_have_parity,
- &have_cache,
+ &have_cache, 0,
+ BCH_DATA_parity,
reserve,
- 0,
cl);
open_bucket_for_each(c, &buckets, ob, i) {
@@ -1478,9 +1478,9 @@ static int new_stripe_alloc_buckets(struct btree_trans *trans, struct ec_stripe_
&devs,
h->s->nr_data,
&nr_have_data,
- &have_cache,
+ &have_cache, 0,
+ BCH_DATA_user,
reserve,
- 0,
cl);
open_bucket_for_each(c, &buckets, ob, i) {