aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2026-03-28 19:39:10 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2026-03-28 19:39:10 +0000
commitb65e7b4944cc2f594c9d9e6abc9b8618d3d62ff8 (patch)
tree92d710fce451583ff9444a41f784a38a98a2d2c4
parent6cc99baea607255859ee958608e4db6e2ff24793 (diff)
nfs_nfsdsocket.c: All Copy and Clone across file systems
For some server file system types, such as ZFS, a Copy/Clone operation can be done across file systems of the same file system type. As such, this patch allows the Copy/Clone to be attempted when the file handles are for files on different file systems. This fixes a problem for exported ZFS file systems when a copy_files on file_range(2) between file systems in the same NFSv4 mount is attempted. PR: 294010 MFC after: 2 weeks
-rw-r--r--sys/fs/nfsserver/nfs_nfsdsocket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdsocket.c b/sys/fs/nfsserver/nfs_nfsdsocket.c
index 201f3b74b946..efa7906dffc7 100644
--- a/sys/fs/nfsserver/nfs_nfsdsocket.c
+++ b/sys/fs/nfsserver/nfs_nfsdsocket.c
@@ -1272,7 +1272,8 @@ tryagain:
if (vp == NULL || savevp == NULL) {
nd->nd_repstat = NFSERR_NOFILEHANDLE;
break;
- } else if (fsidcmp(&cur_fsid, &save_fsid) != 0) {
+ } else if (fsidcmp(&cur_fsid, &save_fsid) != 0 &&
+ op != NFSV4OP_COPY && op != NFSV4OP_CLONE) {
nd->nd_repstat = NFSERR_XDEV;
break;
}