svcrdma: Select NFSv4.1 backchannel transport based on forward channel
[firefly-linux-kernel-4.4.55.git] / fs / nfsd / nfs4callback.c
index 7f05cd140de3cb2a8c75665bdbcad8bb3d823582..cc8c5b32043cb9f221a739957a95a4e6fd71f78b 100644 (file)
@@ -637,9 +637,11 @@ static struct rpc_cred *get_backchannel_cred(struct nfs4_client *clp, struct rpc
 
 static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *conn, struct nfsd4_session *ses)
 {
+       int maxtime = max_cb_time(clp->net);
        struct rpc_timeout      timeparms = {
-               .to_initval     = max_cb_time(clp->net),
+               .to_initval     = maxtime,
                .to_retries     = 0,
+               .to_maxval      = maxtime,
        };
        struct rpc_create_args args = {
                .net            = clp->net,
@@ -670,7 +672,8 @@ static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *c
                clp->cl_cb_session = ses;
                args.bc_xprt = conn->cb_xprt;
                args.prognumber = clp->cl_cb_session->se_cb_prog;
-               args.protocol = XPRT_TRANSPORT_BC_TCP;
+               args.protocol = conn->cb_xprt->xpt_class->xcl_ident |
+                               XPRT_TRANSPORT_BC;
                args.authflavor = ses->se_cb_sec.flavor;
        }
        /* Create RPC client */