Date: Fri, 27 Sep 2019 22:18:51 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r352825 - projects/nfsv42/sys/fs/nfsserver Message-ID: <201909272218.x8RMIp1K058023@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 ||
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909272218.x8RMIp1K058023>