linux-next/fs/jbd2
Zhang Yi a0851ea9cd
jbd2: flush filesystem device before updating tail sequence
When committing transaction in jbd2_journal_commit_transaction(), the
disk caches for the filesystem device should be flushed before updating
the journal tail sequence. However, this step is missed if the journal
is not located on the filesystem device. As a result, the filesystem may
become inconsistent following a power failure or system crash. Fix it by
ensuring that the filesystem device is flushed appropriately.

Fixes: 3339578f05 ("jbd2: cleanup journal tail after transaction commit")
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://lore.kernel.org/r/20241203014407.805916-3-yi.zhang@huaweicloud.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2024-12-04 12:00:05 +01:00
..
checkpoint.c ext4: fix incorrect tid assumption in jbd2_journal_shrink_checkpoint_list() 2024-08-26 23:39:48 -04:00
commit.c jbd2: flush filesystem device before updating tail sequence 2024-12-04 12:00:05 +01:00
journal.c jbd2: Fix comment describing journal_init_common() 2024-11-13 12:56:48 -05: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: remove the 'success' parameter from the jbd2_do_replay() function 2024-11-12 23:54:14 -05:00
revoke.c jbd2: increase IO priority for writing revoke records 2024-12-04 12:00:05 +01:00
transaction.c jbd2: avoid infinite transaction commit loop 2024-07-08 23:59:37 -04:00