summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/ec_types.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_types.h
parentded54580bdf18ba3a2b38e7910c54b1c53f007c6 (diff)
downloadlinux-stable-ffb7c3d370a104d14ad0658b359cdf04ae679f04.tar.gz
linux-stable-ffb7c3d370a104d14ad0658b359cdf04ae679f04.tar.bz2
linux-stable-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_types.h')
-rw-r--r--fs/bcachefs/ec_types.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/bcachefs/ec_types.h b/fs/bcachefs/ec_types.h
index e4d633fca5bf..5b688b4394f7 100644
--- a/fs/bcachefs/ec_types.h
+++ b/fs/bcachefs/ec_types.h
@@ -4,11 +4,9 @@
#include <linux/llist.h>
-#define EC_STRIPE_MAX 16
-
struct bch_replicas_padded {
struct bch_replicas_entry e;
- u8 pad[EC_STRIPE_MAX];
+ u8 pad[BCH_BKEY_PTRS_MAX];
};
struct stripe {
@@ -24,7 +22,7 @@ struct stripe {
unsigned dirty:1;
unsigned on_heap:1;
u8 blocks_nonempty;
- u16 block_sectors[EC_STRIPE_MAX];
+ u16 block_sectors[BCH_BKEY_PTRS_MAX];
struct bch_replicas_padded r;
};