diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-11-28 19:42:05 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:17 +0200 |
commit | fc6c01e2ea5292a740ddedb5b2b3805e8ecb3f4b (patch) | |
tree | bc9b86af3d7198eb57f96b65e645d537601c65b2 /fs/bcachefs/alloc_foreground.h | |
parent | bcachefs: Fix page state after fallocate (diff) | |
download | linux-fc6c01e2ea5292a740ddedb5b2b3805e8ecb3f4b.tar.xz linux-fc6c01e2ea5292a740ddedb5b2b3805e8ecb3f4b.zip |
bcachefs: Convert bucket_alloc_ret to negative error codes
Start a new header, errcode.h, for bcachefs-private error codes - more
error codes will be converted later.
This patch just converts bucket_alloc_ret so that they can be mixed with
standard error codes and passed as ERR_PTR errors - the ec.c code was
doing this already, but incorrectly.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/alloc_foreground.h')
-rw-r--r-- | fs/bcachefs/alloc_foreground.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/bcachefs/alloc_foreground.h b/fs/bcachefs/alloc_foreground.h index c658295cb8e0..2e81712ba8d1 100644 --- a/fs/bcachefs/alloc_foreground.h +++ b/fs/bcachefs/alloc_foreground.h @@ -12,13 +12,6 @@ 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]; @@ -98,8 +91,7 @@ static inline void bch2_open_bucket_get(struct bch_fs *c, } } -enum bucket_alloc_ret -bch2_bucket_alloc_set(struct bch_fs *, struct open_buckets *, +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 *); |