diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2013-12-31 13:11:43 -0500 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-02-16 15:09:38 +0100 |
commit | 51fedbbb1a7838732e8de08bec078c2e0066974a (patch) | |
tree | 0fed0c2d9a3cb7beb87e592d725c3d8d275c9b65 | |
parent | 6686e9091ed571d4a616d2e655c22e34ded49fcb (diff) |
SUNRPC: Handle connect errors ECONNABORTED and EHOSTUNREACH
commit df2772700c6ee706be7b2fd16c6bf2c1bf63cda0 upstream.
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>
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r-- | net/sunrpc/clnt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 27826e1471ff..21607ff675c1 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1637,6 +1637,7 @@ call_bind_status(struct rpc_task *task) return; case -ECONNREFUSED: /* connection problems */ case -ECONNRESET: + case -ECONNABORTED: case -ENOTCONN: case -EHOSTDOWN: case -EHOSTUNREACH: @@ -1707,7 +1708,9 @@ call_connect_status(struct rpc_task *task) return; case -ECONNREFUSED: case -ECONNRESET: + case -ECONNABORTED: case -ENETUNREACH: + case -EHOSTUNREACH: /* retry with existing socket, after a delay */ rpc_delay(task, 3*HZ); if (RPC_IS_SOFTCONN(task)) @@ -1807,6 +1810,7 @@ call_transmit_status(struct rpc_task *task) break; } case -ECONNRESET: + case -ECONNABORTED: case -ENOTCONN: case -EPIPE: rpc_task_force_reencode(task); @@ -1916,8 +1920,9 @@ call_status(struct rpc_task *task) xprt_conditional_disconnect(req->rq_xprt, req->rq_connect_cookie); break; - case -ECONNRESET: case -ECONNREFUSED: + case -ECONNRESET: + case -ECONNABORTED: rpc_force_rebind(clnt); rpc_delay(task, 3*HZ); case -EPIPE: |