summaryrefslogtreecommitdiff
path: root/rust/zerocopy-derive/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorZhang Yi <yi.zhang@huawei.com>2026-07-14 16:23:22 +0800
committerChristian Brauner <brauner@kernel.org>2026-07-23 11:26:27 +0200
commit562d192c43459d70d955775e8a17eebd995539d4 (patch)
treeceff7dfaa6c015985a47c2452ae829959bc886f2 /rust/zerocopy-derive/git@git.tavy.me:linux.git
parent88c26515313169806a412a362b32a1eca53d21bd (diff)
iomap: support invalidating partial folios
Current iomap_invalidate_folio() can only invalidate an entire folio. If we truncate a partial folio on a filesystem where the block size is smaller than the folio size, it will leave behind dirty bits for the truncated or punched blocks. During the write-back process, it will attempt to map the invalid hole range. Fortunately, this has not caused any real problems so far because the ->writeback_range() function corrects the length. However, the implementation of FALLOC_FL_ZERO_RANGE in ext4 depends on the support for invalidating partial folios. When ext4 partially zeroes out a dirty and unwritten folio, it does not perform a flush first like XFS. Therefore, if the dirty bits of the corresponding area cannot be cleared, the zeroed area after writeback remains in the written state rather than reverting to the unwritten state. Fix this by supporting invalidation of partial folios. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Link: https://patch.msgid.link/20260714082325.325163-3-yi.zhang@huaweicloud.com Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Joanne Koong <joannelkoong@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'rust/zerocopy-derive/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions