On Sat, Oct 12, 2024 at 11:37:27AM GMT, Hongbo Li wrote: > > > On 2024/10/12 10:09, Kent Overstreet wrote: > > Reported-by: [email protected] > > Signed-off-by: Kent Overstreet <[email protected]> > > --- > > fs/bcachefs/sb-members.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/fs/bcachefs/sb-members.c b/fs/bcachefs/sb-members.c > > index 02bcde3c1b02..b06ba1d0d037 100644 > > --- a/fs/bcachefs/sb-members.c > > +++ b/fs/bcachefs/sb-members.c > > @@ -247,7 +247,10 @@ static void member_to_text(struct printbuf *out, > > prt_newline(out); > > prt_printf(out, "Btree allocated bitmap blocksize:\t"); > > - prt_units_u64(out, 1ULL << m.btree_bitmap_shift); > > + if (m.btree_bitmap_shift < 64) > > + prt_units_u64(out, 1ULL << m.btree_bitmap_shift); > > + else > > + prt_printf(out, "(invalid shift %u)", m.btree_bitmap_shift); > > I wonder why we don't check in .validate, like the former > csum_granularity_bits does.
actually we need to do both; we want to be able to print things that don't validate so that we can debug. I'll make that change, thanks
