]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
nfsd: probe the back channel on new connections
authorWeston Andros Adamson <dros@netapp.com>
Thu, 24 May 2012 19:42:17 +0000 (15:42 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 20 Jun 2012 12:59:39 +0000 (08:59 -0400)
Initiate a CB probe when a new connection with the correct direction is added
to a session (IFF backchannel is marked as down).  Without this a
BIND_CONN_TO_SESSION has no effect on the internal backchannel state, which
causes the server to reply to every SEQUENCE op with the
SEQ4_STATUS_CB_PATH_DOWN flag set until DESTROY_SESSION.

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c

index 94effd5bc4a107086ef53515ac2bb9dc39950b88..8b80a10d4fc5b1f0e2b22dba4458d07699a4e68e 100644 (file)
@@ -862,6 +862,11 @@ static __be32 nfsd4_new_conn(struct svc_rqst *rqstp, struct nfsd4_session *ses,
        if (ret)
                /* oops; xprt is already down: */
                nfsd4_conn_lost(&conn->cn_xpt_user);
+       if (ses->se_client->cl_cb_state == NFSD4_CB_DOWN &&
+               dir & NFS4_CDFC4_BACK) {
+               /* callback channel may be back up */
+               nfsd4_probe_callback(ses->se_client);
+       }
        return nfs_ok;
 }