summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/bset.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-01-05 21:14:50 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-06 05:24:21 +0100
commitd04d2727438575e1884ccd4a2eff34f5ee5acedd (patch)
tree80d1e396a41f0871c2c81aa0c4c7744668052085 /fs/bcachefs/bset.c
parentbcachefs: improve checksum error messages (diff)
downloadlinux-d04d2727438575e1884ccd4a2eff34f5ee5acedd.tar.xz
linux-d04d2727438575e1884ccd4a2eff34f5ee5acedd.zip
bcachefs: bch2_dump_bset() doesn't choke on u64s == 0
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bset.c')
-rw-r--r--fs/bcachefs/bset.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/bcachefs/bset.c b/fs/bcachefs/bset.c
index bb73ba9017b0..74bf8eb90a4c 100644
--- a/fs/bcachefs/bset.c
+++ b/fs/bcachefs/bset.c
@@ -68,6 +68,12 @@ void bch2_dump_bset(struct bch_fs *c, struct btree *b,
_k = _n) {
_n = bkey_p_next(_k);
+ if (!_k->u64s) {
+ printk(KERN_ERR "block %u key %5zu - u64s 0? aieee!\n", set,
+ _k->_data - i->_data);
+ break;
+ }
+
k = bkey_disassemble(b, _k, &uk);
printbuf_reset(&buf);