lkml.org 
[lkml]   [2015]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3.12 106/122] SUNRPC: Ensure xprt_connect_status handles all potential connection errors
Date
From: Trond Myklebust <trond.myklebust@primarydata.com>

3.12-stable review patch. If anyone has any objections, please let me know.

===============

commit 0fe8d04e8c3a1eb49089793e38b60a17cee564e3 upstream.

Currently, xprt_connect_status will convert connection error values such
as ECONNREFUSED, ECONNRESET, ... into EIO, which means that they never
get handled.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
net/sunrpc/xprt.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 42ce6bfc729d..92ed62ee5a32 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -745,6 +745,11 @@ static void xprt_connect_status(struct rpc_task *task)
}

switch (task->tk_status) {
+ case -ECONNREFUSED:
+ case -ECONNRESET:
+ case -ECONNABORTED:
+ case -ENETUNREACH:
+ case -EHOSTUNREACH:
case -EAGAIN:
dprintk("RPC: %5u xprt_connect_status: retrying\n", task->tk_pid);
break;
--
2.2.2


\
 
 \ /
  Last update: 2015-02-17 13:01    [W:0.540 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site