svn commit: r352825 - projects/nfsv42/sys/fs/nfsserver

Rick Macklem rmacklem at FreeBSD.org
Fri Sep 27 22:18:51 UTC 2019


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 ||


More information about the svn-src-projects mailing list