We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 600b8be commit a0bd30eCopy full SHA for a0bd30e
fs/bcachefs/bkey.c
@@ -660,8 +660,9 @@ int bch2_bkey_format_invalid(struct bch_fs *c,
660
bch2_bkey_format_field_overflows(f, i)) {
661
unsigned unpacked_bits = bch2_bkey_format_current.bits_per_field[i];
662
u64 unpacked_max = ~((~0ULL << 1) << (unpacked_bits - 1));
663
- u64 packed_max = f->bits_per_field[i]
664
- ? ~((~0ULL << 1) << (f->bits_per_field[i] - 1))
+ unsigned packed_bits = min(64, f->bits_per_field[i]);
+ u64 packed_max = packed_bits
665
+ ? ~((~0ULL << 1) << (packed_bits - 1))
666
: 0;
667
668
prt_printf(err, "field %u too large: %llu + %llu > %llu",
0 commit comments