From owner-svn-src-projects@freebsd.org Fri Sep 27 22:18:51 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 7405C12F0A3 for ; Fri, 27 Sep 2019 22:18:51 +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 46g5mW2XDzz4RjD; Fri, 27 Sep 2019 22:18:51 +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 3B3DB1F951; Fri, 27 Sep 2019 22:18:51 +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 x8RMIpv8058024; Fri, 27 Sep 2019 22:18:51 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8RMIp1K058023; Fri, 27 Sep 2019 22:18:51 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201909272218.x8RMIp1K058023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 27 Sep 2019 22:18:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r352825 - 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: 352825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fri, 27 Sep 2019 22:18:51 -0000 Author: rmacklem Date: Fri Sep 27 22:18:50 2019 New Revision: 352825 URL: https://svnweb.freebsd.org/changeset/base/352825 Log: Allow the NFSv4.2 Copy operation to do a synchronous copy when ca_synchronous is false. When ca_synchronous == false, the server can still choose to do a synchronous Copy, so that is what this patch makes it do. 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 Fri Sep 27 22:11:50 2019 (r352824) +++ projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c Fri Sep 27 22:18:50 2019 (r352825) @@ -5250,15 +5250,13 @@ nfsrvd_copy_file_range(struct nfsrv_descript *nd, __un outlop->lo_end = outlop->lo_first + len; } - /* Only supports synchronous Copy. */ - if (*++tl != newnfs_true) { - nd->nd_repstat = NFSERR_OFFLOADNOREQS; - NFSM_BUILD(tl, uint32_t *, 2 * NFSX_UNSIGNED); - *tl++ = newnfs_true; - *tl = newnfs_true; - goto nfsmout; - } - cnt = fxdr_unsigned(int, *++tl); + /* + * At this time only consecutive, synchronous copy is supported, + * so ca_consecutive and ca_synchronous can be ignored. + */ + tl += 2; + + cnt = fxdr_unsigned(int, *tl); if ((nd->nd_flag & ND_DSSERVER) != 0 || cnt != 0) nd->nd_repstat = NFSERR_NOTSUPP; if (nd->nd_repstat == 0 && (inoff > OFF_MAX || outoff > OFF_MAX ||