]> git.ipfire.org Git - thirdparty/linux.git/commit
jbd2: store more accurate errno in superblock when possible
authorWengang Wang <wen.gang.wang@oracle.com>
Fri, 31 Oct 2025 21:05:01 +0000 (14:05 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 26 Nov 2025 22:05:39 +0000 (17:05 -0500)
commit80d05f640a51f94b88640db7f1551f8e8fee44b9
tree9654e1f9cffa11782c281f9d814e2e3db363be09
parent986835bf4d11032bba4ab8414d18fce038c61bb4
jbd2: store more accurate errno in superblock when possible

When jbd2_journal_abort() is called, the provided error code is stored
in the journal superblock. Some existing calls hard-code -EIO even when
the actual failure is not I/O related.

This patch updates those calls to pass more accurate error codes,
allowing the superblock to record the true cause of failure. This helps
improve diagnostics and debugging clarity when analyzing journal aborts.

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Message-ID: <20251031210501.7337-1-wen.gang.wang@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/super.c
fs/jbd2/checkpoint.c
fs/jbd2/journal.c
fs/jbd2/transaction.c