summaryrefslogtreecommitdiff
path: root/fs/bcachefs/alloc_foreground.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-02-25 10:22:49 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:56 +0300
commit7635e1a6d6740ce76e1c2204f9237f01c98153b3 (patch)
tree4c4da48cc475344da4ab46bbc7afe509bf4a5d52 /fs/bcachefs/alloc_foreground.h
parente53d03fe39f1458065ddb5f7309ade066ba6fb95 (diff)
downloadlinux-7635e1a6d6740ce76e1c2204f9237f01c98153b3.tar.xz
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/alloc_foreground.h')
-rw-r--r--fs/bcachefs/alloc_foreground.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/alloc_foreground.h b/fs/bcachefs/alloc_foreground.h
index 4f492e278493..1fa96f8c6879 100644
--- a/fs/bcachefs/alloc_foreground.h
+++ b/fs/bcachefs/alloc_foreground.h
@@ -31,8 +31,7 @@ void bch2_dev_stripe_increment(struct bch_dev *, struct dev_stripe_state *);
long bch2_bucket_alloc_new_fs(struct bch_dev *);
struct open_bucket *bch2_bucket_alloc(struct bch_fs *, struct bch_dev *,
- enum alloc_reserve, bool,
- struct closure *);
+ enum alloc_reserve, struct closure *);
static inline void ob_push(struct bch_fs *c, struct open_buckets *obs,
struct open_bucket *ob)
@@ -152,8 +151,9 @@ static inline bool bch2_bucket_is_open_safe(struct bch_fs *c, unsigned dev, u64
int bch2_bucket_alloc_set_trans(struct btree_trans *, struct open_buckets *,
struct dev_stripe_state *, struct bch_devs_mask *,
- unsigned, unsigned *, bool *, enum alloc_reserve,
- unsigned, struct closure *);
+ unsigned, unsigned *, bool *, unsigned,
+ enum bch_data_type, enum alloc_reserve,
+ struct closure *);
int bch2_alloc_sectors_start_trans(struct btree_trans *,
unsigned, unsigned,