aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2013-12-31 13:11:43 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2013-12-31 13:42:22 -0500
commitdf2772700c6ee706be7b2fd16c6bf2c1bf63cda0 (patch)
tree612688400d8c8992da366871e7dcbe7c5a12c30c /net
parent0fe8d04e8c3a1eb49089793e38b60a17cee564e3 (diff)
SUNRPC: Handle connect errors ECONNABORTED and EHOSTUNREACH
Ensure that call_bind_status, call_connect_status, call_transmit_status and call_status all are capable of handling ECONNABORTED and EHOSTUNREACH. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/clnt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index f09b7db2c492..b9276a63eaf1 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1729,6 +1729,7 @@ call_bind_status(struct rpc_task *task)
1729 return; 1729 return;
1730 case -ECONNREFUSED: /* connection problems */ 1730 case -ECONNREFUSED: /* connection problems */
1731 case -ECONNRESET: 1731 case -ECONNRESET:
1732 case -ECONNABORTED:
1732 case -ENOTCONN: 1733 case -ENOTCONN:
1733 case -EHOSTDOWN: 1734 case -EHOSTDOWN:
1734 case -EHOSTUNREACH: 1735 case -EHOSTUNREACH:
@@ -1799,7 +1800,9 @@ call_connect_status(struct rpc_task *task)
1799 return; 1800 return;
1800 case -ECONNREFUSED: 1801 case -ECONNREFUSED:
1801 case -ECONNRESET: 1802 case -ECONNRESET:
1803 case -ECONNABORTED:
1802 case -ENETUNREACH: 1804 case -ENETUNREACH:
1805 case -EHOSTUNREACH:
1803 /* retry with existing socket, after a delay */ 1806 /* retry with existing socket, after a delay */
1804 rpc_delay(task, 3*HZ); 1807 rpc_delay(task, 3*HZ);
1805 if (RPC_IS_SOFTCONN(task)) 1808 if (RPC_IS_SOFTCONN(task))
@@ -1902,6 +1905,7 @@ call_transmit_status(struct rpc_task *task)
1902 break; 1905 break;
1903 } 1906 }
1904 case -ECONNRESET: 1907 case -ECONNRESET:
1908 case -ECONNABORTED:
1905 case -ENOTCONN: 1909 case -ENOTCONN:
1906 case -EPIPE: 1910 case -EPIPE:
1907 rpc_task_force_reencode(task); 1911 rpc_task_force_reencode(task);
@@ -2011,8 +2015,9 @@ call_status(struct rpc_task *task)
2011 xprt_conditional_disconnect(req->rq_xprt, 2015 xprt_conditional_disconnect(req->rq_xprt,
2012 req->rq_connect_cookie); 2016 req->rq_connect_cookie);
2013 break; 2017 break;
2014 case -ECONNRESET:
2015 case -ECONNREFUSED: 2018 case -ECONNREFUSED:
2019 case -ECONNRESET:
2020 case -ECONNABORTED:
2016 rpc_force_rebind(clnt); 2021 rpc_force_rebind(clnt);
2017 rpc_delay(task, 3*HZ); 2022 rpc_delay(task, 3*HZ);
2018 case -EPIPE: 2023 case -EPIPE: