summaryrefslogtreecommitdiff
path: root/fs/bcachefs/ec.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-12-14 22:34:03 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:19 +0300
commite409999069928bc1da79f32e7adff88f981c65a5 (patch)
tree4677a1da967b76d3e5d04aa3a85af442d0fd6af4 /fs/bcachefs/ec.c
parent8244f3209b5b49a6bde9921d7825af9f57161b23 (diff)
downloadlinux-e409999069928bc1da79f32e7adff88f981c65a5.tar.xz
bcachefs: Turn encoded_extent_max into a regular option
It'll now be handled at format time and in sysfs like other options - it still can only be set at format time, though. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/ec.c')
-rw-r--r--fs/bcachefs/ec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c
index 4424cb3ac822..c3f86cc39842 100644
--- a/fs/bcachefs/ec.c
+++ b/fs/bcachefs/ec.c
@@ -1152,7 +1152,7 @@ static void ec_stripe_key_init(struct bch_fs *c,
s->v.algorithm = 0;
s->v.nr_blocks = nr_data + nr_parity;
s->v.nr_redundant = nr_parity;
- s->v.csum_granularity_bits = ilog2(c->sb.encoded_extent_max);
+ s->v.csum_granularity_bits = ilog2(c->opts.encoded_extent_max >> 9);
s->v.csum_type = BCH_CSUM_crc32c;
s->v.pad = 0;