diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2013-12-31 13:13:30 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2013-12-31 13:42:22 -0500 |
commit | 0fe8d04e8c3a1eb49089793e38b60a17cee564e3 (patch) | |
tree | d4463802809184fa533b503cc25998f76cba8a2f | |
parent | 23e66ba97127ff3b064d4c6c5138aa34eafc492f (diff) |
SUNRPC: Ensure xprt_connect_status handles all potential connection errors
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>
-rw-r--r-- | net/sunrpc/xprt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 04199bc8416f..ddd198e90292 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -749,6 +749,11 @@ static void xprt_connect_status(struct rpc_task *task) | |||
749 | } | 749 | } |
750 | 750 | ||
751 | switch (task->tk_status) { | 751 | switch (task->tk_status) { |
752 | case -ECONNREFUSED: | ||
753 | case -ECONNRESET: | ||
754 | case -ECONNABORTED: | ||
755 | case -ENETUNREACH: | ||
756 | case -EHOSTUNREACH: | ||
752 | case -EAGAIN: | 757 | case -EAGAIN: |
753 | dprintk("RPC: %5u xprt_connect_status: retrying\n", task->tk_pid); | 758 | dprintk("RPC: %5u xprt_connect_status: retrying\n", task->tk_pid); |
754 | break; | 759 | break; |