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>
This commit is contained in:
@@ -528,7 +528,7 @@ static int xs_udp_send_request(struct rpc_task *task)
|
||||
xdr->len - req->rq_bytes_sent, status);
|
||||
|
||||
if (status >= 0) {
|
||||
task->tk_bytes_sent += status;
|
||||
req->rq_xmit_bytes_sent += status;
|
||||
if (status >= req->rq_slen)
|
||||
return 0;
|
||||
/* Still some bytes left; set up for a retry later. */
|
||||
@@ -624,7 +624,7 @@ static int xs_tcp_send_request(struct rpc_task *task)
|
||||
/* If we've sent the entire packet, immediately
|
||||
* reset the count of bytes sent. */
|
||||
req->rq_bytes_sent += status;
|
||||
task->tk_bytes_sent += status;
|
||||
req->rq_xmit_bytes_sent += status;
|
||||
if (likely(req->rq_bytes_sent >= req->rq_slen)) {
|
||||
req->rq_bytes_sent = 0;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user