]> Gentwo Git Trees - linux/.git/commit
xfs: always trim mapping to requested range for zero range
authorBrian Foster <bfoster@redhat.com>
Fri, 3 Oct 2025 13:46:38 +0000 (09:46 -0400)
committerChristian Brauner <brauner@kernel.org>
Wed, 5 Nov 2025 11:57:25 +0000 (12:57 +0100)
commit5c13dde963dfe38ad88757e53d1fb8883cd01385
treed7d28a5f8740c2a0eea1441558e8aff8bb88333b
parent395ed1ef0012e1bb1e4050e84ba0173b3623112a
xfs: always trim mapping to requested range for zero range

Refactor and tweak the IOMAP_ZERO logic in preparation to support
filling the folio batch for unwritten mappings. Drop the superfluous
imap offset check since the hole case has already been filtered out.
Split the the delalloc case handling into a sub-branch, and always
trim the imap to the requested offset/count so it can be more easily
used to bound the range to lookup in pagecache.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/xfs/xfs_iomap.c