aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-09-25 13:39:45 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-10-01 18:22:11 -0400
commitca7f33aa5b8051f17eec81766b8f39c83caf4196 (patch)
tree0a7e31e04a72011fb94ce165f8b2c9723cec2472 /net/sunrpc
parent99875249bfbfb6d9a2aba020ce65da2862d0dafa (diff)
SUNRPC: Fix RPC call retransmission statistics
A retransmit should be when you successfully transmit an RPC call to the server a second time. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/clnt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index b58525009e40..bde31159f632 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1719,6 +1719,8 @@ call_connect_status(struct rpc_task *task)
1719static void 1719static void
1720call_transmit(struct rpc_task *task) 1720call_transmit(struct rpc_task *task)
1721{ 1721{
1722 int is_retrans = RPC_WAS_SENT(task);
1723
1722 dprint_status(task); 1724 dprint_status(task);
1723 1725
1724 task->tk_action = call_status; 1726 task->tk_action = call_status;
@@ -1743,6 +1745,8 @@ call_transmit(struct rpc_task *task)
1743 xprt_transmit(task); 1745 xprt_transmit(task);
1744 if (task->tk_status < 0) 1746 if (task->tk_status < 0)
1745 return; 1747 return;
1748 if (is_retrans)
1749 task->tk_client->cl_stats->rpcretrans++;
1746 /* 1750 /*
1747 * On success, ensure that we call xprt_end_transmit() before sleeping 1751 * On success, ensure that we call xprt_end_transmit() before sleeping
1748 * in order to allow access to the socket to other RPC requests. 1752 * in order to allow access to the socket to other RPC requests.
@@ -1983,7 +1987,6 @@ call_timeout(struct rpc_task *task)
1983 rpcauth_invalcred(task); 1987 rpcauth_invalcred(task);
1984 1988
1985retry: 1989retry:
1986 clnt->cl_stats->rpcretrans++;
1987 task->tk_action = call_bind; 1990 task->tk_action = call_bind;
1988 task->tk_status = 0; 1991 task->tk_status = 0;
1989} 1992}
@@ -2026,7 +2029,6 @@ call_decode(struct rpc_task *task)
2026 if (req->rq_rcv_buf.len < 12) { 2029 if (req->rq_rcv_buf.len < 12) {
2027 if (!RPC_IS_SOFT(task)) { 2030 if (!RPC_IS_SOFT(task)) {
2028 task->tk_action = call_bind; 2031 task->tk_action = call_bind;
2029 clnt->cl_stats->rpcretrans++;
2030 goto out_retry; 2032 goto out_retry;
2031 } 2033 }
2032 dprintk("RPC: %s: too small RPC reply size (%d bytes)\n", 2034 dprintk("RPC: %s: too small RPC reply size (%d bytes)\n",