[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250916093337.3161016-1-yi.zhang@huaweicloud.com>
Date: Tue, 16 Sep 2025 17:33:35 +0800
From: Zhang Yi <yi.zhang@...weicloud.com>
To: linux-ext4@...r.kernel.org
Cc: linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
tytso@....edu,
adilger.kernel@...ger.ca,
jack@...e.cz,
hsiangkao@...ux.alibaba.com,
yi.zhang@...wei.com,
yi.zhang@...weicloud.com,
libaokun1@...wei.com,
yukuai3@...wei.com,
yangerkun@...wei.com
Subject: [PATCH 0/2] ext4: fix an data corruption issue in nojournal mode
From: Zhang Yi <yi.zhang@...wei.com>
Hello!
This series fixes an data corruption issue reported by Gao Xiang in
nojournal mode. The problem is happened after a metadata block is freed,
it can be immediately reallocated as a data block. However, the metadata
on this block may still be in the process of being written back, which
means the new data in this block could potentially be overwritten by the
stale metadata and trigger a data corruption issue. Please see below
discussion with Jan for more details:
https://lore.kernel.org/linux-ext4/a9417096-9549-4441-9878-b1955b899b4e@huaweicloud.com/
Patch 1 strengthens the same case in ordered journal mode, theoretically
preventing the occurrence of stale data issues.
Patch 2 fix this issue in nojournal mode.
Regards,
Yi.
Zhang Yi (2):
jbd2: ensure that all ongoing I/O complete before freeing blocks
ext4: wait for ongoing I/O to complete before freeing blocks
fs/ext4/ext4_jbd2.c | 11 +++++++++--
fs/jbd2/transaction.c | 13 +++++++++----
2 files changed, 18 insertions(+), 6 deletions(-)
--
2.46.1
Powered by blists - more mailing lists