RE:(2) [PATCH] nfsd: do not return overlapping extents in a block layout
From: Daejun Park
Date: Wed Oct 07 2026 - 21:44:25 EST
On Wed, Oct 07, 2026 at 03:11:33PM +0200, Christoph Hellwig wrote:
> But given that you're pretty active in this part of nfsd now, can you
> also look into my earlier suggestion to allow a single map_blocks
> return multiple mappings? That solves more of the root cause of
> creating incoherencies.
I posted it here:
https://lore.kernel.org/r/20261008-xfs-nfsd-map-blocks-v1-0-560026cdccb6@xxxxxxxxxxx
->map_blocks now fills an array of mappings. XFS maps the whole range
of a layout under one hold of the iolock and the invalidate lock (the
latter as Darrick pointed out in the earlier thread), with one flush and
at most one log force, and nfsd checks that the extents follow each
other instead of trimming them. The window between ->map_blocks and
nfsd4_insert_layout() is narrower but still there.