From f6b94a3baa956ff10a52a545a9ad60f35e88e683 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Mon, 6 Jul 2020 22:33:54 -0400 Subject: bcachefs: Refactor stripe creation Prep work for the patch to update existing stripes with new data blocks. This moves allocating new stripes into ec.c, and also sets up the data structures so that we can handly only allocating some of the blocks in a stripe. Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- fs/bcachefs/alloc_foreground.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fs/bcachefs/alloc_foreground.h') diff --git a/fs/bcachefs/alloc_foreground.h b/fs/bcachefs/alloc_foreground.h index 687f973e4b3a..17a6869bb8cd 100644 --- a/fs/bcachefs/alloc_foreground.h +++ b/fs/bcachefs/alloc_foreground.h @@ -92,6 +92,11 @@ static inline void bch2_open_bucket_get(struct bch_fs *c, } } +int bch2_bucket_alloc_set(struct bch_fs *, struct open_buckets *, + struct dev_stripe_state *, struct bch_devs_mask *, + unsigned, unsigned *, bool *, enum alloc_reserve, + unsigned, struct closure *); + struct write_point *bch2_alloc_sectors_start(struct bch_fs *, unsigned, unsigned, struct write_point_specifier, -- cgit v1.2.3