[PATCH v2 0/2] exportfs, xfs, nfsd: map a whole pNFS block layout in one ->map_blocks call
From: Daejun Park via B4 Relay
Date: Wed Nov 25 2026 - 20:52:34 EST
nfsd gets a pNFS block layout from XFS with one ->map_blocks call per
extent. Patch 2 lets one call return all of them, as Christoph and
Darrick suggested, and patch 1 prepares XFS for it. fstests and pynfs
give the same results with and without the series.
The series needs four fixes. The first two are posted separately, and
the other two are in nfsd-testing:
- nfsd: stop a block layout at the maximum file size
- xfs: punch delalloc blocks past EOF before mapping a pNFS layout
- nfsd: do not return overlapping extents in a block layout
- nfsd: do not allocate blocks for an RW layout with a minlength of zero
Once they are in mainline, I will rebase the series for the VFS tree,
as Chuck suggested.
Changes in v2:
- Drop v1 patches 1-3 and 6, now in mainline (2 in another form).
- Fold the interface, the XFS loop and the nfsd caller into one patch.
- Allocate the mapping array with kvmalloc (Chuck).
- Keep nfsd's trim of a mapping that starts below the offset, instead
of refusing it.
---
Daejun Park (2):
xfs: factor the mapping of one pNFS extent out of xfs_fs_map_blocks()
exportfs, xfs, nfsd: map a whole pNFS block layout in one ->map_blocks call
fs/nfsd/blocklayout.c | 137 ++++++++++++++++++----------------
fs/xfs/xfs_pnfs.c | 163 +++++++++++++++++++++++++----------------
include/linux/exportfs_block.h | 17 +++--
3 files changed, 187 insertions(+), 130 deletions(-)
---
base-commit: 25527067098f9d95562244fd64749ebaae3077f9
change-id: 20261008-xfs-nfsd-map-blocks-417d5b6aae42
Best regards,
--
Daejun Park <daejun7.park@xxxxxxxxxxx>