From b43f724927686387589b98eb762e1a4109bb1bac Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 1 Jun 2025 13:07:31 -0400 Subject: [PATCH] bcachefs: Log fsck errors in the journal Log the specific error being corrected in the journal when we're repairing, this helps greatly with 'bcachefs list_journal' analysis. Signed-off-by: Kent Overstreet --- fs/bcachefs/error.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/bcachefs/error.c b/fs/bcachefs/error.c index 63951e293c47..ff49cebfd0e8 100644 --- a/fs/bcachefs/error.c +++ b/fs/bcachefs/error.c @@ -620,6 +620,9 @@ print: if (s) s->ret = ret; + + if (trans) + ret = bch2_trans_log_str(trans, bch2_sb_error_strs[err]) ?: ret; err_unlock: mutex_unlock(&c->fsck_error_msgs_lock); err: -- 2.25.1