From owner-svn-src-stable-11@freebsd.org Sun May 7 21:42:03 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED114D63687; Sun, 7 May 2017 21:42:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 844F41747; Sun, 7 May 2017 21:42:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47Lg2mA060823; Sun, 7 May 2017 21:42:02 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47Lg2Gh060821; Sun, 7 May 2017 21:42:02 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705072142.v47Lg2Gh060821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 21:42:02 +0000 (UTC) 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 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 21:42:04 -0000 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);