summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorChris Mason <mason@kernel.org>2026-11-12 16:46:18 -0500
committerCarlos Maiolino <cem@kernel.org>2026-11-16 11:45:49 +0100
commit855abf2cf8cd69a248362ca4b518de9387dd6bf5 (patch)
treed4239c45bd5001f41bdb8dcd23795e344ea4d830 /include/uapi
parent44e555acd77a839110f3b1e02a75f9165baaaeec (diff)
xfs: test for realtime and reflink under the pNFS locks
A pNFS client can write to blocks that its file shares with another file, or that are no part of its file, if a LAYOUTGET races with a clone or with FS_IOC_FSSETXATTR. xfs_fs_map_blocks() hands out no layout for a reflinked or a realtime inode, since the client writes in place and only knows the data device. But it tests for both before it takes the IOLOCK, and both flags are set under that lock: LAYOUTGET clone ========= ===== takes the IOLOCK breaks the layouts xfs_fs_map_blocks() sees no reflink flag waits for the IOLOCK sets the reflink flag shares the blocks drops the IOLOCK maps the shared blocks /* the client writes in place */ If FS_IOC_FSSETXATTR sets the realtime flag of an empty file instead, the blocks come from the realtime device, and nfsd points the client at the same address on the data device. The fix used here is to test for both once the locks are held. Fixes: e54b5bf9d7ae ("xfs: recognize the reflink feature bit") Fixes: 527851124d10 ("xfs: implement pNFS export operations") Signed-off-by: Chris Mason <mason@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions