Re: (2) [PATCH] xfs: refuse a pNFS LAYOUTCOMMIT of a range without blocks
From: Christoph Hellwig
Date: Wed Oct 14 2026 - 09:09:15 EST
On Wed, Oct 14, 2026 at 10:40:17AM +0900, Daejun Park wrote:
> The IOLOCK held across both keeps truncate, fallocate and blockgc out
> today, but the flag doesn't depend on that, so v2 does it that way:
> xfs_bmapi_write() takes a new XFS_BMAPI_CONVERT_ONLY flag that fails for
> a hole or a delalloc extent instead of allocating, and
> xfs_fs_commit_blocks() passes it through xfs_iomap_write_unwritten().
>
> One difference from v1: a LAYOUTCOMMIT with a laid-out range followed by
> a hole now converts the laid-out range before it fails.
> xfs_fs_commit_blocks() already left earlier extents converted when a
> later one failed, and the Linux client resends all of its extents after
> a failed LAYOUTCOMMIT, so I don't think that matters.
I don't think that's an issue.