aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorRicardo Labiaga <Ricardo.Labiaga@netapp.com>2009-04-01 09:23:28 -0400
committerBenny Halevy <bhalevy@panasas.com>2009-06-17 17:11:40 -0400
commitdd2b63d049480979016b959abc2d141cdddb1389 (patch)
tree3b1f9a59b5c0a7c6027ec102a034a4236b41ebd6 /net/sunrpc/xprt.c
parent281fe15dc1d6ad46992f18b7a6644269ec5f7138 (diff)
nfs41: Rename rq_received to rq_reply_bytes_recvd
The 'rq_received' member of 'struct rpc_rqst' is used to track when we have received a reply to our request. With v4.1, the backchannel can now accept callback requests over the existing connection. Rename this field to make it clear that it is only used for tracking reply bytes and not all bytes received on the connection. Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index c144611223fc..f412a852bc73 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -806,9 +806,10 @@ void xprt_complete_rqst(struct rpc_task *task, int copied)
806 806
807 list_del_init(&req->rq_list); 807 list_del_init(&req->rq_list);
808 req->rq_private_buf.len = copied; 808 req->rq_private_buf.len = copied;
809 /* Ensure all writes are done before we update req->rq_received */ 809 /* Ensure all writes are done before we update */
810 /* req->rq_reply_bytes_recvd */
810 smp_wmb(); 811 smp_wmb();
811 req->rq_received = copied; 812 req->rq_reply_bytes_recvd = copied;
812 rpc_wake_up_queued_task(&xprt->pending, task); 813 rpc_wake_up_queued_task(&xprt->pending, task);
813} 814}
814EXPORT_SYMBOL_GPL(xprt_complete_rqst); 815EXPORT_SYMBOL_GPL(xprt_complete_rqst);
@@ -823,7 +824,7 @@ static void xprt_timer(struct rpc_task *task)
823 dprintk("RPC: %5u xprt_timer\n", task->tk_pid); 824 dprintk("RPC: %5u xprt_timer\n", task->tk_pid);
824 825
825 spin_lock_bh(&xprt->transport_lock); 826 spin_lock_bh(&xprt->transport_lock);
826 if (!req->rq_received) { 827 if (!req->rq_reply_bytes_recvd) {
827 if (xprt->ops->timer) 828 if (xprt->ops->timer)
828 xprt->ops->timer(task); 829 xprt->ops->timer(task);
829 } else 830 } else
@@ -845,8 +846,8 @@ int xprt_prepare_transmit(struct rpc_task *task)
845 dprintk("RPC: %5u xprt_prepare_transmit\n", task->tk_pid); 846 dprintk("RPC: %5u xprt_prepare_transmit\n", task->tk_pid);
846 847
847 spin_lock_bh(&xprt->transport_lock); 848 spin_lock_bh(&xprt->transport_lock);
848 if (req->rq_received && !req->rq_bytes_sent) { 849 if (req->rq_reply_bytes_recvd && !req->rq_bytes_sent) {
849 err = req->rq_received; 850 err = req->rq_reply_bytes_recvd;
850 goto out_unlock; 851 goto out_unlock;
851 } 852 }
852 if (!xprt->ops->reserve_xprt(task)) 853 if (!xprt->ops->reserve_xprt(task))
@@ -875,7 +876,7 @@ void xprt_transmit(struct rpc_task *task)
875 876
876 dprintk("RPC: %5u xprt_transmit(%u)\n", task->tk_pid, req->rq_slen); 877 dprintk("RPC: %5u xprt_transmit(%u)\n", task->tk_pid, req->rq_slen);
877 878
878 if (!req->rq_received) { 879 if (!req->rq_reply_bytes_recvd) {
879 if (list_empty(&req->rq_list) && rpc_reply_expected(task)) { 880 if (list_empty(&req->rq_list) && rpc_reply_expected(task)) {
880 /* 881 /*
881 * Add to the list only if we're expecting a reply 882 * Add to the list only if we're expecting a reply
@@ -914,7 +915,7 @@ void xprt_transmit(struct rpc_task *task)
914 /* Don't race with disconnect */ 915 /* Don't race with disconnect */
915 if (!xprt_connected(xprt)) 916 if (!xprt_connected(xprt))
916 task->tk_status = -ENOTCONN; 917 task->tk_status = -ENOTCONN;
917 else if (!req->rq_received && rpc_reply_expected(task)) { 918 else if (!req->rq_reply_bytes_recvd && rpc_reply_expected(task)) {
918 /* 919 /*
919 * Sleep on the pending queue since 920 * Sleep on the pending queue since
920 * we're expecting a reply. 921 * we're expecting a reply.