Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 May 2017 21:57:46 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r317927 - in stable/10/sys/fs: nfs nfsclient
Message-ID:  <201705072157.v47Lvkdl066106@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705072157.v47Lvkdl066106>