From owner-svn-src-projects@freebsd.org Sun Jul 28 22:00:46 2019 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BC650B60FB for ; Sun, 28 Jul 2019 22:00:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BE5F817B2; Sun, 28 Jul 2019 22:00:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 676311E51B; Sun, 28 Jul 2019 22:00:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6SM0klT091682; Sun, 28 Jul 2019 22:00:46 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6SM0kWX091681; Sun, 28 Jul 2019 22:00:46 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201907282200.x6SM0kWX091681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 28 Jul 2019 22:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r350397 - projects/nfsv42/sys/fs/nfsserver X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/nfsv42/sys/fs/nfsserver X-SVN-Commit-Revision: 350397 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9BE5F817B2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2019 22:00:46 -0000 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);