Date: Sun, 7 May 2017 21:42:02 +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-11@freebsd.org Subject: svn commit: r317926 - in stable/11/sys/fs: nfs nfsclient Message-ID: <201705072142.v47Lg2Gh060821@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705072142.v47Lg2Gh060821>