From owner-dev-commits-src-all@freebsd.org Sun Apr 18 01:47:14 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 11AED5EAFE1; Sun, 18 Apr 2021 01:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FNCVp017Hz3qP5; Sun, 18 Apr 2021 01:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E76CD229DE; Sun, 18 Apr 2021 01:47:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13I1lD3Z069976; Sun, 18 Apr 2021 01:47:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13I1lDuN069975; Sun, 18 Apr 2021 01:47:13 GMT (envelope-from git) Date: Sun, 18 Apr 2021 01:47:13 GMT Message-Id: <202104180147.13I1lDuN069975@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: daf3f4596a55 - stable/13 - nfsd: fix BindConnectionToSession so that it clears "cb path down" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: daf3f4596a553a3379c2feb0422924407f6f39df Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 01:47:14 -0000 The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=daf3f4596a553a3379c2feb0422924407f6f39df commit daf3f4596a553a3379c2feb0422924407f6f39df Author: Rick Macklem AuthorDate: 2021-04-04 22:05:39 +0000 Commit: Rick Macklem CommitDate: 2021-04-18 01:44:11 +0000 nfsd: fix BindConnectionToSession so that it clears "cb path down" Commit 01ae8969a9ee stopped the NFSv4.1/4.2 server from implicitly binding the back channel to a new TCP connection so that it conforms to RFC5661, for NFSv4.1/4.2. An effect of this for the Linux NFS client is that it will do a BindConnectionToSession when it sees NFSV4SEQ_CBPATHDOWN set in a sequence reply. It will do this for every RPC reply until it no longer sees the flag. Without that patch, this will happen until the client does an Open, which will clear LCL_CBDOWN. This patch clears LCL_CBDOWN right away, so that NFSV4SEQ_CBPATHDOWN will no longer be sent to the client in Sequence replies and the Linux client will not repeat the BindConnectionToSession RPCs. This is not critical for correct behaviour, but reduces RPC overheads for cases where the Open will not be done for a while. (cherry picked from commit 6f2addd838810ce33c7e9ad9543827d45e0b491c) --- sys/fs/nfsserver/nfs_nfsdstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index 5ac37ed07cae..1cf0dcee99e9 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -6440,6 +6440,7 @@ nfsrv_bindconnsess(struct nfsrv_descript *nd, uint8_t *sessionid, int *foreaftp) sep->sess_crflags |= NFSV4CRSESS_CONNBACKCHAN; clp->lc_flags |= LCL_DONEBINDCONN | LCL_NEEDSCBNULL; + clp->lc_flags &= ~LCL_CBDOWN; if (*foreaftp == NFSCDFS4_BACK) *foreaftp = NFSCDFS4_BACK; else