diff options
author | 2024-01-05 15:14:50 -0500 | |
---|---|---|
committer | 2024-01-05 23:24:21 -0500 | |
commit | d04d2727438575e1884ccd4a2eff34f5ee5acedd (patch) | |
tree | 80d1e396a41f0871c2c81aa0c4c7744668052085 | |
parent | bcachefs: improve checksum error messages (diff) | |
download | linux-d04d2727438575e1884ccd4a2eff34f5ee5acedd.tar.gz linux-d04d2727438575e1884ccd4a2eff34f5ee5acedd.tar.bz2 linux-d04d2727438575e1884ccd4a2eff34f5ee5acedd.zip |
bcachefs: bch2_dump_bset() doesn't choke on u64s == 0
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/bset.c | 6 |
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); |