diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-07-11 18:52:14 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:43 -0400 |
commit | 8f3b41ab4f39f87712ed57e0443642d7bcabd1ff (patch) | |
tree | c41656a9bd017e19d57bf58643cd86dc94e1300d /fs/bcachefs/alloc_foreground.h | |
parent | 63b214e75b1c941d3fc81da5b7fc4aa997e40873 (diff) |
bcachefs: Don't restrict copygc writes to the same device
This no longer makes any sense, since copygc is now one thread per
filesystem, not per device, with a single write point.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_foreground.h')
-rw-r--r-- | fs/bcachefs/alloc_foreground.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/fs/bcachefs/alloc_foreground.h b/fs/bcachefs/alloc_foreground.h index 17a6869bb8cd..e8357ec0b333 100644 --- a/fs/bcachefs/alloc_foreground.h +++ b/fs/bcachefs/alloc_foreground.h @@ -12,6 +12,13 @@ struct bch_dev; struct bch_fs; struct bch_devs_List; +enum bucket_alloc_ret { + ALLOC_SUCCESS, + OPEN_BUCKETS_EMPTY, + FREELIST_EMPTY, /* Allocator thread not keeping up */ + INSUFFICIENT_DEVICES, +}; + struct dev_alloc_list { unsigned nr; u8 devs[BCH_SB_MEMBERS_MAX]; @@ -92,10 +99,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 *); +enum bucket_alloc_ret +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, |