bcachefs: Rework open bucket partial list allocation
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 25 Feb 2023 07:22:49 +0000 (02:22 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:56 +0000 (17:09 -0400)
commit7635e1a6d6740ce76e1c2204f9237f01c98153b3
tree4c4da48cc475344da4ab46bbc7afe509bf4a5d52
parente53d03fe39f1458065ddb5f7309ade066ba6fb95
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>
fs/bcachefs/alloc_foreground.c
fs/bcachefs/alloc_foreground.h
fs/bcachefs/alloc_types.h
fs/bcachefs/ec.c
fs/bcachefs/journal.c
fs/bcachefs/trace.h