Date: Sun, 28 Jul 2019 22:00:46 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r350397 - projects/nfsv42/sys/fs/nfsserver Message-ID: <201907282200.x6SM0kWX091681@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907282200.x6SM0kWX091681>