linux/fs/jbd2
Ye Bin 0bab8db415 jbd2: avoid mount failed when commit block is partial submitted
We encountered a problem that the file system could not be mounted in
the power-off scenario. The analysis of the file system mirror shows that
only part of the data is written to the last commit block.
The valid data of the commit block is concentrated in the first sector.
However, the data of the entire block is involved in the checksum calculation.
For different hardware, the minimum atomic unit may be different.
If the checksum of a committed block is incorrect, clear the data except the
'commit_header' and then calculate the checksum. If the checkusm is correct,
it is considered that the block is partially committed, Then continue to replay
journal.

Signed-off-by: Ye Bin <yebin10@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20240620072405.3533701-1-yebin@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2024-07-08 23:59:37 -04:00
..
checkpoint.c jbd2: add prefix 'jbd2' for 'shrink_type' 2024-05-09 10:52:31 -04:00
commit.c jbd2: speed up jbd2_transaction_committed() 2024-07-05 12:45:36 -04:00
journal.c jbd2: add missing MODULE_DESCRIPTION() 2024-07-05 13:26:19 -04:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
recovery.c jbd2: avoid mount failed when commit block is partial submitted 2024-07-08 23:59:37 -04:00
revoke.c jbd2: rename jbd_debug() to jbd2_debug() 2022-08-02 23:52:19 -04:00
transaction.c jbd2: abort journal when detecting metadata writeback error of fs dev 2024-01-04 23:42:21 -05:00