svn commit: r317927 - in stable/10/sys/fs: nfs nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Sun May 7 21:57:48 UTC 2017
Author: rmacklem
Date: Sun May 7 21:57:46 2017
New Revision: 317927
URL: https://svnweb.freebsd.org/changeset/base/317927
Log:
MFC: r317275, r317344
Don't create a backchannel for a DS connection.
An NFSv4.1 client connection to a Data Server (DS) should not have a
backchannel. This patch fixes the NFSv4.1/pNFS client to not do a backchannel
for this case.
Found during recent testing with the pNFS server under development.
Modified:
stable/10/sys/fs/nfs/nfs_commonkrpc.c
stable/10/sys/fs/nfsclient/nfs_clrpcops.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/fs/nfs/nfs_commonkrpc.c
==============================================================================
--- stable/10/sys/fs/nfs/nfs_commonkrpc.c Sun May 7 21:42:02 2017 (r317926)
+++ stable/10/sys/fs/nfs/nfs_commonkrpc.c Sun May 7 21:57:46 2017 (r317927)
@@ -281,7 +281,8 @@ newnfs_connect(struct nfsmount *nmp, str
retries = nmp->nm_retry;
} else
retries = INT_MAX;
- if (NFSHASNFSV4N(nmp)) {
+ /* cred == NULL for DS connects. */
+ if (NFSHASNFSV4N(nmp) && cred != NULL) {
/*
* Make sure the nfscbd_pool doesn't get destroyed
* while doing this.
Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sun May 7 21:42:02 2017 (r317926)
+++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sun May 7 21:57:46 2017 (r317927)
@@ -4610,7 +4610,7 @@ nfsrpc_createsession(struct nfsmount *nm
*tl++ = sep->nfsess_clientid.lval[1];
*tl++ = txdr_unsigned(sequenceid);
crflags = (NFSMNT_RDONLY(nmp->nm_mountp) ? 0 : NFSV4CRSESS_PERSIST);
- if (nfscl_enablecallb != 0 && nfs_numnfscbd > 0)
+ if (nfscl_enablecallb != 0 && nfs_numnfscbd > 0 && mds != 0)
crflags |= NFSV4CRSESS_CONNBACKCHAN;
*tl = txdr_unsigned(crflags);
More information about the svn-src-all
mailing list