]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
SUNRPC: Allow caller to specify the transport to use
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sat, 30 Jan 2016 23:13:05 +0000 (18:13 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 5 Feb 2016 23:48:55 +0000 (18:48 -0500)
This is needed in order to allow the NFSv4.1 backchannel and
BIND_CONN_TO_SESSION function to work.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
include/linux/sunrpc/sched.h
net/sunrpc/sched.c

index 0b248e98ee3bd0e6283f9b3190227274d3879a57..05a1809c44d99e59813576a1e2a6daf242e2a4be 100644 (file)
@@ -103,6 +103,7 @@ struct rpc_call_ops {
 struct rpc_task_setup {
        struct rpc_task *task;
        struct rpc_clnt *rpc_client;
+       struct rpc_xprt *rpc_xprt;
        const struct rpc_message *rpc_message;
        const struct rpc_call_ops *callback_ops;
        void *callback_data;
index 73ad57a59989cb9234d06c1d399e02408e50c7d3..fcfd48d263f64f1f52ef317a9a8974a8a457196e 100644 (file)
@@ -909,6 +909,8 @@ static void rpc_init_task(struct rpc_task *task, const struct rpc_task_setup *ta
        /* Initialize workqueue for async tasks */
        task->tk_workqueue = task_setup_data->workqueue;
 
+       task->tk_xprt = xprt_get(task_setup_data->rpc_xprt);
+
        if (task->tk_ops->rpc_call_prepare != NULL)
                task->tk_action = rpc_prepare_task;