diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-06-09 15:44:03 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:41 -0400 |
commit | 374153c2a958f33805e68a20770e4f0b503be48e (patch) | |
tree | 020fa23fe998856844d69c61831690211a9bb68e /fs/bcachefs/alloc_types.h | |
parent | e38821f322d97ca1289bea704eed9d276f47c521 (diff) |
bcachefs: More open buckets
We need a larger open bucket reserve now that the btree interior update
path holds onto open bucket references; filesystems with many high
through devices may need more open buckets now.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_types.h')
-rw-r--r-- | fs/bcachefs/alloc_types.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/bcachefs/alloc_types.h b/fs/bcachefs/alloc_types.h index 832568dc9551..4f1465077994 100644 --- a/fs/bcachefs/alloc_types.h +++ b/fs/bcachefs/alloc_types.h @@ -46,16 +46,22 @@ enum alloc_reserve { typedef FIFO(long) alloc_fifo; -/* Enough for 16 cache devices, 2 tiers and some left over for pipelining */ -#define OPEN_BUCKETS_COUNT 256 +#define OPEN_BUCKETS_COUNT 1024 #define WRITE_POINT_HASH_NR 32 #define WRITE_POINT_MAX 32 +typedef u16 open_bucket_idx_t; + struct open_bucket { spinlock_t lock; atomic_t pin; - u8 freelist; + open_bucket_idx_t freelist; + + /* + * When an open bucket has an ec_stripe attached, this is the index of + * the block in the stripe this open_bucket corresponds to: + */ u8 ec_idx; u8 type; unsigned valid:1; @@ -68,8 +74,8 @@ struct open_bucket { #define OPEN_BUCKET_LIST_MAX 15 struct open_buckets { - u8 nr; - u8 v[OPEN_BUCKET_LIST_MAX]; + open_bucket_idx_t nr; + open_bucket_idx_t v[OPEN_BUCKET_LIST_MAX]; }; struct dev_stripe_state { |