summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
authorTrond Myklebust2013-09-24 18:00:27 +0200
committerTrond Myklebust2013-10-02 00:22:11 +0200
commit8a19a0b6cb2e2216afd68ef2047f30260cc8a220 (patch)
treeae3c46e80fd5fcafc28c531d333b24e60de2e0e9 /net/sunrpc/clnt.c
parentSUNRPC: Clean up - convert xprt_prepare_transmit to return a bool (diff)
downloadkernel-qcow2-linux-8a19a0b6cb2e2216afd68ef2047f30260cc8a220.tar.gz
kernel-qcow2-linux-8a19a0b6cb2e2216afd68ef2047f30260cc8a220.tar.xz
kernel-qcow2-linux-8a19a0b6cb2e2216afd68ef2047f30260cc8a220.zip
SUNRPC: Add RPC task and client level options to disable the resend timeout
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index fa50e42aabd3..b58525009e40 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -772,6 +772,8 @@ void rpc_task_set_client(struct rpc_task *task, struct rpc_clnt *clnt)
atomic_inc(&clnt->cl_count);
if (clnt->cl_softrtry)
task->tk_flags |= RPC_TASK_SOFT;
+ if (clnt->cl_noretranstimeo)
+ task->tk_flags |= RPC_TASK_NO_RETRANS_TIMEOUT;
if (sk_memalloc_socks()) {
struct rpc_xprt *xprt;
@@ -1898,7 +1900,8 @@ call_status(struct rpc_task *task)
rpc_delay(task, 3*HZ);
case -ETIMEDOUT:
task->tk_action = call_timeout;
- if (task->tk_client->cl_discrtry)
+ if (!(task->tk_flags & RPC_TASK_NO_RETRANS_TIMEOUT)
+ && task->tk_client->cl_discrtry)
xprt_conditional_disconnect(req->rq_xprt,
req->rq_connect_cookie);
break;