aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-02-22 14:57:57 -0500
committerBen Hutchings <ben@decadent.org.uk>2013-03-20 15:03:16 +0000
commit8c5e63a26e6b92c4cb171273beadc02a989f4939 (patch)
tree641b247555539617fddeb60635a8bc3b24467da1 /net/sunrpc
parentb42d5faf4e168d24b85c2c3f59f8d0ee4385dfa1 (diff)
downloadkernel_samsung_smdk4412-8c5e63a26e6b92c4cb171273beadc02a989f4939.zip
kernel_samsung_smdk4412-8c5e63a26e6b92c4cb171273beadc02a989f4939.tar.gz
kernel_samsung_smdk4412-8c5e63a26e6b92c4cb171273beadc02a989f4939.tar.bz2
SUNRPC: Don't start the retransmission timer when out of socket space
commit a9a6b52ee1baa865283a91eb8d443ee91adfca56 upstream. If the socket is full, we're better off just waiting until it empties, or until the connection is broken. The reason why we generally don't want to time out is that the call to xprt->ops->release_xprt() will trigger a connection reset, which isn't helpful... Let's make an exception for soft RPC calls, since they have to provide timeout guarantees. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xprt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 6c91208..3c5d329 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -481,13 +481,17 @@ EXPORT_SYMBOL_GPL(xprt_wake_pending_tasks);
* xprt_wait_for_buffer_space - wait for transport output buffer to clear
* @task: task to be put to sleep
* @action: function pointer to be executed after wait
+ *
+ * Note that we only set the timer for the case of RPC_IS_SOFT(), since
+ * we don't in general want to force a socket disconnection due to
+ * an incomplete RPC call transmission.
*/
void xprt_wait_for_buffer_space(struct rpc_task *task, rpc_action action)
{
struct rpc_rqst *req = task->tk_rqstp;
struct rpc_xprt *xprt = req->rq_xprt;
- task->tk_timeout = req->rq_timeout;
+ task->tk_timeout = RPC_IS_SOFT(task) ? req->rq_timeout : 0;
rpc_sleep_on(&xprt->pending, task, action);
}
EXPORT_SYMBOL_GPL(xprt_wait_for_buffer_space);