Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192323
b: refs/heads/master
c: bbc72ce
h: refs/heads/master
i:
  192321: 1c6c5e9
  192319: 591f43e
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed May 14, 2010
1 parent f5e2ad0 commit 2ca910b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bc4e3ca46e4eb9cb434de4175c6041d00bbdca3
refs/heads/master: bbc72cea58f671665b6362be0d4e391813ac0eee
1 change: 0 additions & 1 deletion trunk/include/linux/sunrpc/xprt.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ void xprt_set_retrans_timeout_rtt(struct rpc_task *task);
void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status);
void xprt_wait_for_buffer_space(struct rpc_task *task, rpc_action action);
void xprt_write_space(struct rpc_xprt *xprt);
void xprt_update_rtt(struct rpc_task *task);
void xprt_adjust_cwnd(struct rpc_task *task, int result);
struct rpc_rqst * xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid);
void xprt_complete_rqst(struct rpc_task *task, int copied);
Expand Down
13 changes: 4 additions & 9 deletions trunk/net/sunrpc/xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -774,25 +774,18 @@ struct rpc_rqst *xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid)
}
EXPORT_SYMBOL_GPL(xprt_lookup_rqst);

/**
* xprt_update_rtt - update an RPC client's RTT state after receiving a reply
* @task: RPC request that recently completed
*
*/
void xprt_update_rtt(struct rpc_task *task)
static void xprt_update_rtt(struct rpc_task *task)
{
struct rpc_rqst *req = task->tk_rqstp;
struct rpc_rtt *rtt = task->tk_client->cl_rtt;
unsigned timer = task->tk_msg.rpc_proc->p_timer;

if (timer) {
if (req->rq_ntrans == 1)
rpc_update_rtt(rtt, timer,
(long)jiffies - req->rq_xtime);
rpc_update_rtt(rtt, timer, task->tk_rtt);
rpc_set_timeo(rtt, timer, req->rq_ntrans - 1);
}
}
EXPORT_SYMBOL_GPL(xprt_update_rtt);

/**
* xprt_complete_rqst - called when reply processing is complete
Expand All @@ -811,6 +804,8 @@ void xprt_complete_rqst(struct rpc_task *task, int copied)

xprt->stat.recvs++;
task->tk_rtt = (long)jiffies - req->rq_xtime;
if (xprt->ops->timer != NULL)
xprt_update_rtt(task);

list_del_init(&req->rq_list);
req->rq_private_buf.len = copied;
Expand Down
1 change: 0 additions & 1 deletion trunk/net/sunrpc/xprtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,6 @@ static void xs_udp_data_ready(struct sock *sk, int len)
dst_confirm(skb_dst(skb));

xprt_adjust_cwnd(task, copied);
xprt_update_rtt(task);
xprt_complete_rqst(task, copied);

out_unlock:
Expand Down

0 comments on commit 2ca910b

Please sign in to comment.