[PATCH 0/4] ext4: assorted fixes related to the buffered iomap conversion

From: Zhang Yi

Date: Mon Oct 26 2026 - 08:06:24 EST


From: Zhang Yi <yi.zhang@xxxxxxxxxx>

Hi,

This series fixes some small issues introduced by the iomap
conversion [1] as well as some pre-existing issues found by Sashiko. The
first two patches were sent separately before [2]. Packaging them into
this series to facilitate merging.

Patch 1/4: fixes a complaint from smatch, making ext4_iomap_writepages()
return 0 directly when it encounters an inode that doesn't go
through the buffered iomap path during leftover writeback,
instead of reusing the stale ret variable, even though it is
also 0. Not a functional problem, it just makes the code
clearer and silences the complaint.

Patch 2/4: fixes a possible extent status cache inconsistency when
truncating an inode that is in the middle of a delayed inline
data conversion.

Patch 3/4: fixes the issue reported by Sashiko where
ext4_alloc_file_blocks() cannot guarantee atomicity when
converting extents during fallocate WRITE_ZEROES, causing
fsck to complain.

Patch 4/4: fixes the issue reported by Sashiko where the tracepoint on
the iomap delalloc write path prints an uninitialized m_pblk
when it encounters a delalloc-mapped extent.

Thanks,
Yi.

[1] https://lore.kernel.org/linux-ext4/20261009103033.2920530-1-yi.zhang@xxxxxxxxxxxxxxx/
[2] https://lore.kernel.org/linux-ext4/20261014021714.2382353-1-yi.zhang@xxxxxxxxxxxxxxx/
https://lore.kernel.org/linux-ext4/20261016095927.1762656-1-yi.zhang@xxxxxxxxxxxxxxx/


Zhang Yi (4):
ext4: return 0 instead of stale ret in ext4_iomap_writepages()
ext4: fix extent status cache clearing when truncating inline data
ext4: add inode to orphan list before extent conversion
ext4: initialize map->m_pblk in ext4_da_map_blocks()

fs/ext4/extents.c | 49 +++++++++++++++++++++++++++++++----------------
fs/ext4/inline.c | 8 ++++++--
fs/ext4/inode.c | 3 ++-
3 files changed, 40 insertions(+), 20 deletions(-)

--
2.52.0