summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/ec.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-12-16 14:23:27 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:50 -0400
commitffb7c3d370a104d14ad0658b359cdf04ae679f04 (patch)
tree8bc29b326f11dd7ef8a6cbe5065f3b361b11aefa /fs/bcachefs/ec.h
parentded54580bdf18ba3a2b38e7910c54b1c53f007c6 (diff)
downloadlinux-ffb7c3d370a104d14ad0658b359cdf04ae679f04.tar.gz
linux-ffb7c3d370a104d14ad0658b359cdf04ae679f04.tar.bz2
linux-ffb7c3d370a104d14ad0658b359cdf04ae679f04.zip
bcachefs: Add BCH_BKEY_PTRS_MAX
This now means "the maximum number of pointers within a bkey" - and bch_devs_list is updated to use it instead of BCH_REPLICAS_MAX, since stripes can contain more than BCH_REPLICAS_MAX pointers. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/ec.h')
-rw-r--r--fs/bcachefs/ec.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/ec.h b/fs/bcachefs/ec.h
index 15f751fc2a35..450bb1a113a3 100644
--- a/fs/bcachefs/ec.h
+++ b/fs/bcachefs/ec.h
@@ -71,9 +71,9 @@ struct ec_stripe_buf {
/* might not be buffering the entire stripe: */
unsigned offset;
unsigned size;
- unsigned long valid[BITS_TO_LONGS(EC_STRIPE_MAX)];
+ unsigned long valid[BITS_TO_LONGS(BCH_BKEY_PTRS_MAX)];
- void *data[EC_STRIPE_MAX];
+ void *data[BCH_BKEY_PTRS_MAX];
union {
struct bkey_i_stripe key;
@@ -101,10 +101,10 @@ struct ec_stripe_new {
bool existing_stripe;
u64 existing_stripe_idx;
- unsigned long blocks_allocated[BITS_TO_LONGS(EC_STRIPE_MAX)];
+ unsigned long blocks_allocated[BITS_TO_LONGS(BCH_BKEY_PTRS_MAX)];
struct open_buckets blocks;
- u8 data_block_idx[EC_STRIPE_MAX];
+ u8 data_block_idx[BCH_BKEY_PTRS_MAX];
struct open_buckets parity;
struct disk_reservation res;