summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorZhang Yi <yi.zhang@huawei.com>2025-07-07 22:08:06 +0800
committerTheodore Ts'o <tytso@mit.edu>2025-07-13 23:41:51 -0400
commitded2d726a3041fce8afd88005cbfe15cd4737702 (patch)
treefda7a59572a2f4f0514c10d923a37f4dd6586647 /tools/perf/scripts/python/export-to-sqlite.py
parentf922c8c2461b022a2efd9914484901fb358a5b2a (diff)
ext4: fix stale data if it bail out of the extents mapping loop
During the process of writing back folios, if mpage_map_and_submit_extent() exits the extent mapping loop due to an ENOSPC or ENOMEM error, it may result in stale data or filesystem inconsistency in environments where the block size is smaller than the folio size. When mapping a discontinuous folio in mpage_map_and_submit_extent(), some buffers may have already be mapped. If we exit the mapping loop prematurely, the folio data within the mapped range will not be written back, and the file's disk size will not be updated. Once the transaction that includes this range of extents is committed, this can lead to stale data or filesystem inconsistency. Fix this by submitting the current processing partially mapped folio. Suggested-by: Jan Kara <jack@suse.cz> Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20250707140814.542883-4-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions