]> www.infradead.org Git - users/hch/xfs.git/commit
xfs: punch delalloc extents from the COW fork for COW writes xfs-iomap_end-fixes
authorChristoph Hellwig <hch@lst.de>
Mon, 26 Aug 2024 06:16:23 +0000 (08:16 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 8 Oct 2024 05:50:38 +0000 (07:50 +0200)
commitf1ecd7b270454d6ce7afc81c21b35071326e26c4
treeef28f8657d30380a7f5aae57a06ac204eb0ee4cc
parent6a43f5a047bec61ff9ef8cfbb94f072cae6290bd
xfs: punch delalloc extents from the COW fork for COW writes

When ->iomap_end is called on a short write to the COW fork it needs to
punch stale delalloc data from the COW fork and not the data fork.

Ensure that IOMAP_F_NEW is set for new COW fork allocations in
xfs_buffered_write_iomap_begin, and then use the IOMAP_F_SHARED flag
in xfs_buffered_write_delalloc_punch to decide which fork to punch.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_iomap.c