summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-09-24 12:00:27 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-10-01 18:22:11 -0400
commit8a19a0b6cb2e2216afd68ef2047f30260cc8a220 (patch)
treeae3c46e80fd5fcafc28c531d333b24e60de2e0e9 /net/sunrpc/xprt.c
parent90051ea774613ffc6b8aad3dc665c8505d6205a8 (diff)
downloadlinux-stable-8a19a0b6cb2e2216afd68ef2047f30260cc8a220.tar.gz
linux-stable-8a19a0b6cb2e2216afd68ef2047f30260cc8a220.tar.bz2
linux-stable-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/xprt.c')
-rw-r--r--net/sunrpc/xprt.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 2326af57b9b9..d166d9947e36 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -873,9 +873,18 @@ bool xprt_prepare_transmit(struct rpc_task *task)
dprintk("RPC: %5u xprt_prepare_transmit\n", task->tk_pid);
spin_lock_bh(&xprt->transport_lock);
- if (req->rq_reply_bytes_recvd && !req->rq_bytes_sent) {
- task->tk_status = req->rq_reply_bytes_recvd;
- goto out_unlock;
+ if (!req->rq_bytes_sent) {
+ if (req->rq_reply_bytes_recvd) {
+ task->tk_status = req->rq_reply_bytes_recvd;
+ goto out_unlock;
+ }
+ if ((task->tk_flags & RPC_TASK_NO_RETRANS_TIMEOUT)
+ && xprt_connected(xprt)
+ && req->rq_connect_cookie == xprt->connect_cookie) {
+ xprt->ops->set_retrans_timeout(task);
+ rpc_sleep_on(&xprt->pending, task, xprt_timer);
+ goto out_unlock;
+ }
}
if (!xprt->ops->reserve_xprt(xprt, task)) {
task->tk_status = -EAGAIN;