Error logs: [ T5078] invalid journal entry, version=1.7: mi_btree_bitmap type=btree_keys in superblock: k->u64s 0, shutting down [ T5078] invalid journal entry, version=1.7: mi_btree_bitmap type=btree_keys in superblock: k->u64s 0, shutting down [ T5078] invalid journal entry, version=1.7: mi_btree_bitmap type=btree_keys in superblock: k->u64s 0, shutting down
When hit -BCH_ERR_fsck_errors_not_fixed in journal_entry_err, it will make journal_entry_btree_keys_validate output too many same error log, and it will block bch2_fs_start to release state_lock. Reported-and-tested-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=8996d8f176cf946ef641 Signed-off-by: Lizhi Xu <[email protected]> --- fs/bcachefs/journal_io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c index 492426c8d869..67c3f09162e4 100644 --- a/fs/bcachefs/journal_io.c +++ b/fs/bcachefs/journal_io.c @@ -415,6 +415,8 @@ static int journal_entry_btree_keys_validate(struct bch_fs *c, flags|BCH_VALIDATE_journal); if (ret == FSCK_DELETED_KEY) continue; + else if (ret == -BCH_ERR_fsck_errors_not_fixed) + break; k = bkey_next(k); } -- 2.43.0
