svn commit: r350397 - projects/nfsv42/sys/fs/nfsserver
Rick Macklem
rmacklem at FreeBSD.org
Sun Jul 28 22:00:46 UTC 2019
Author: rmacklem
Date: Sun Jul 28 22:00:45 2019
New Revision: 350397
URL: https://svnweb.freebsd.org/changeset/base/350397
Log:
Return NFSERR_NOTSUPP for the NFSv4.2 Copy operation if a pNFS server.
A pNFS server would need to proxy the Read/Write operations to the DS(s)
for the NFSv4.2 Copy operation. Normally it should be more efficient for
the client to do the Read/Write operations directly on the DS(s), so
return NFSERR_NOTSUPP for this case to encourage the client to do the I/O
directly on the DS(s).
Modified:
projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c
Modified: projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c Sun Jul 28 21:47:04 2019 (r350396)
+++ projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c Sun Jul 28 22:00:45 2019 (r350397)
@@ -5211,6 +5211,14 @@ nfsrvd_copy_file_range(struct nfsrv_descript *nd, int
nd->nd_repstat = NFSERR_WRONGSEC;
goto nfsmout;
}
+ if (nfsrv_devidcnt > 0) {
+ /*
+ * For a pNFS server, reply NFSERR_NOTSUPP so that the client
+ * will do the copy via I/O on the DS(s).
+ */
+ nd->nd_repstat = NFSERR_NOTSUPP;
+ goto nfsmout;
+ }
NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_STATEID + 3 * NFSX_HYPER +
3 * NFSX_UNSIGNED);
instp->ls_flags = (NFSLCK_CHECK | NFSLCK_READACCESS);
More information about the svn-src-projects
mailing list