From ffb7c3d370a104d14ad0658b359cdf04ae679f04 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Wed, 16 Dec 2020 14:23:27 -0500 Subject: 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 Signed-off-by: Kent Overstreet --- fs/bcachefs/ec.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fs/bcachefs/ec.h') 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; -- cgit v1.2.3