Re: [syzbot] Re: [syzbot] [bcachefs?] INFO: task hung in bch2_fs_read_only_work
From: syzbot
Date: Mon Jul 01 2024 - 04:45:53 EST
For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx.
***
Subject: Re: [syzbot] [bcachefs?] INFO: task hung in bch2_fs_read_only_work
Author: lizhi.xu@xxxxxxxxxxxxx
#syz test: upstream f06ce441457d
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
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);
}