diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-05-13 12:51:49 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-05-14 15:09:36 -0400 |
commit | d60dbb20a74c2cfa142be0a34dac3c6547ea086c (patch) | |
tree | 7af95739f8fbbef11f490b5b58bf639dbbe8a181 /net/sunrpc/xprt.c | |
parent | 9c7e7e23371e629dbb3b341610a418cdf1c19d91 (diff) |
SUNRPC: Move the task->tk_bytes_sent and tk_rtt to struct rpc_rqst
It seems strange to maintain stats for bytes_sent in one structure, and
bytes received in another. Try to assemble all the RPC request-related
stats in struct rpc_rqst
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r-- | net/sunrpc/xprt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 8986b1b82862..65fe2e4e7cbf 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -780,7 +780,7 @@ static void xprt_update_rtt(struct rpc_task *task) | |||
780 | struct rpc_rqst *req = task->tk_rqstp; | 780 | struct rpc_rqst *req = task->tk_rqstp; |
781 | struct rpc_rtt *rtt = task->tk_client->cl_rtt; | 781 | struct rpc_rtt *rtt = task->tk_client->cl_rtt; |
782 | unsigned timer = task->tk_msg.rpc_proc->p_timer; | 782 | unsigned timer = task->tk_msg.rpc_proc->p_timer; |
783 | long m = usecs_to_jiffies(ktime_to_us(task->tk_rtt)); | 783 | long m = usecs_to_jiffies(ktime_to_us(req->rq_rtt)); |
784 | 784 | ||
785 | if (timer) { | 785 | if (timer) { |
786 | if (req->rq_ntrans == 1) | 786 | if (req->rq_ntrans == 1) |
@@ -805,7 +805,7 @@ void xprt_complete_rqst(struct rpc_task *task, int copied) | |||
805 | task->tk_pid, ntohl(req->rq_xid), copied); | 805 | task->tk_pid, ntohl(req->rq_xid), copied); |
806 | 806 | ||
807 | xprt->stat.recvs++; | 807 | xprt->stat.recvs++; |
808 | task->tk_rtt = ktime_sub(ktime_get(), req->rq_xtime); | 808 | req->rq_rtt = ktime_sub(ktime_get(), req->rq_xtime); |
809 | if (xprt->ops->timer != NULL) | 809 | if (xprt->ops->timer != NULL) |
810 | xprt_update_rtt(task); | 810 | xprt_update_rtt(task); |
811 | 811 | ||