Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Apr 2021 01:47:13 GMT
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: daf3f4596a55 - stable/13 - nfsd: fix BindConnectionToSession so that it clears "cb path down"
Message-ID:  <202104180147.13I1lDuN069975@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by rmacklem:

URL: https://cgit.FreeBSD.org/src/commit/?id=daf3f4596a553a3379c2feb0422924407f6f39df

commit daf3f4596a553a3379c2feb0422924407f6f39df
Author:     Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2021-04-04 22:05:39 +0000
Commit:     Rick Macklem <rmacklem@FreeBSD.org>
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



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