svn commit: r317926 - in stable/11/sys/fs: nfs nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Sun May 7 21:42:04 UTC 2017
Author: rmacklem
Date: Sun May 7 21:42:02 2017
New Revision: 317926
URL: https://svnweb.freebsd.org/changeset/base/317926
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/11/sys/fs/nfs/nfs_commonkrpc.c
stable/11/sys/fs/nfsclient/nfs_clrpcops.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/fs/nfs/nfs_commonkrpc.c
==============================================================================
--- stable/11/sys/fs/nfs/nfs_commonkrpc.c Sun May 7 21:32:55 2017 (r317925)
+++ stable/11/sys/fs/nfs/nfs_commonkrpc.c Sun May 7 21:42:02 2017 (r317926)
@@ -280,7 +280,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/11/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- stable/11/sys/fs/nfsclient/nfs_clrpcops.c Sun May 7 21:32:55 2017 (r317925)
+++ stable/11/sys/fs/nfsclient/nfs_clrpcops.c Sun May 7 21:42:02 2017 (r317926)
@@ -4613,7 +4613,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-stable-11
mailing list