]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: look up cow fork extent earlier for buffered iomap_begin
authorBrian Foster <bfoster@redhat.com>
Wed, 11 Mar 2026 16:24:59 +0000 (12:24 -0400)
committerCarlos Maiolino <cem@kernel.org>
Mon, 23 Mar 2026 10:07:59 +0000 (11:07 +0100)
commita8eb41376df987887b33dbf7078d5b13c85f3e0c
tree47413318e209d828ba7f4cd7e133b14b4833d0d2
parentc35a3e273e86e89f73abc4e75e33648fac20eec9
xfs: look up cow fork extent earlier for buffered iomap_begin

To further isolate the need for flushing for zero range, we need to
know whether a hole in the data fork is fronted by blocks in the COW
fork or not. COW fork lookup currently occurs further down in the
function, after the zero range case is handled.

As a preparation step, lift the COW fork extent lookup to earlier in
the function, at the same time as the data fork lookup. Only the
lookup logic is lifted. The COW fork branch/reporting logic remains
as is to avoid any observable behavior change from an iomap
reporting perspective.

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