linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] SUNRPC: Ensure that call_connect times out correctly
@ 2014-03-17 18:40 Trond Myklebust
  2014-03-17 18:40 ` [PATCH 2/2] SUNRPC: Ensure that call_bind " Trond Myklebust
                   ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: Trond Myklebust @ 2014-03-17 18:40 UTC (permalink / raw)
  To: steved; +Cc: linux-nfs

When the server is unavailable due to a networking error, etc, we want
the RPC client to respect the timeout delays when attempting to reconnect.

Fixes: 561ec1603171 (SUNRPC: call_connect_status should recheck bind..)
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
 net/sunrpc/clnt.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 0edada973434..f22d3a115fda 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1798,10 +1798,6 @@ call_connect_status(struct rpc_task *task)
 	trace_rpc_connect_status(task, status);
 	task->tk_status = 0;
 	switch (status) {
-		/* if soft mounted, test if we've timed out */
-	case -ETIMEDOUT:
-		task->tk_action = call_timeout;
-		return;
 	case -ECONNREFUSED:
 	case -ECONNRESET:
 	case -ECONNABORTED:
@@ -1812,7 +1808,9 @@ call_connect_status(struct rpc_task *task)
 		if (RPC_IS_SOFTCONN(task))
 			break;
 	case -EAGAIN:
-		task->tk_action = call_bind;
+	case -ETIMEDOUT:
+		/* Check if we've timed out before looping back to call_bind */
+		task->tk_action = call_timeout;
 		return;
 	case 0:
 		clnt->cl_stats->netreconn++;
-- 
1.8.5.3


^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2014-04-14 17:32 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-17 18:40 [PATCH 1/2] SUNRPC: Ensure that call_connect times out correctly Trond Myklebust
2014-03-17 18:40 ` [PATCH 2/2] SUNRPC: Ensure that call_bind " Trond Myklebust
2014-03-18 19:02   ` Steve Dickson
2014-03-18 15:47 ` [PATCH 1/2] SUNRPC: Ensure that call_connect " Steve Dickson
2014-03-18 15:58   ` Trond Myklebust
2014-03-18 17:24     ` Steve Dickson
2014-03-18 18:45       ` Trond Myklebust
2014-03-18 19:00         ` Steve Dickson
2014-03-18 19:50           ` Trond Myklebust
2014-03-19 12:39             ` Steve Dickson
2014-03-19 12:52               ` Trond Myklebust
2014-03-19 14:07                 ` Steve Dickson
2014-03-19 15:04                   ` Trond Myklebust
2014-03-19 17:10                     ` Steve Dickson
2014-03-19 17:29                       ` Trond Myklebust
2014-03-19 18:22                         ` Steve Dickson
2014-03-19 19:41                           ` Trond Myklebust
2014-03-20 14:12                             ` Steve Dickson
2014-03-20 15:19                               ` Steve Dickson
2014-03-18 18:47       ` Steve Dickson
2014-03-18 18:48 ` Steve Dickson
2014-04-14 16:25 ` Jeff Layton
2014-04-14 16:57   ` Trond Myklebust
2014-04-14 17:32     ` Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).