diff options
| author | Zhang Yi <yi.zhang@huawei.com> | 2026-03-27 18:29:31 +0800 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2026-04-09 21:57:51 -0400 |
| commit | 69e2d5c1f544982389327ff90b491a0f7d1afe48 (patch) | |
| tree | 4d3ded826f664e40faedc2ab794d22826ec22747 /rust/kernel/interop/git@git.tavy.me:linux-stable.git | |
| parent | ad11526d1504641b632918e202e23c9c80923fff (diff) | |
ext4: move ordered data handling out of ext4_block_do_zero_range()
Remove the handle parameter from ext4_block_do_zero_range() and move the
ordered data handling to ext4_block_zero_eof().
This is necessary for truncate up and append writes across a range
extending beyond EOF. The ordered data must be committed before updating
i_disksize to prevent exposing stale on-disk data from concurrent
post-EOF mmap writes during previous folio writeback or in case of
system crash during append writes.
This is unnecessary for partial block hole punching because the entire
punch operation does not provide atomicity guarantees and can already
expose intermediate results in case of crash.
Hole punching can only ever expose data that was there before the punch
but missed zeroing during append / truncate could expose data that was
not visible in the file before the operation.
Since ordered data handling is no longer performed inside
ext4_zero_partial_blocks(), ext4_punch_hole() no longer needs to attach
jinode.
This is prepared for the conversion to the iomap infrastructure, which
does not use ordered data mode while zeroing post-EOF partial blocks.
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260327102939.1095257-6-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'rust/kernel/interop/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
