Commit 51fedbbb authored by Trond Myklebust's avatar Trond Myklebust Committed by Jiri Slaby

SUNRPC: Handle connect errors ECONNABORTED and EHOSTUNREACH

commit df277270 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: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Acked-by: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 6686e909
...@@ -1637,6 +1637,7 @@ call_bind_status(struct rpc_task *task) ...@@ -1637,6 +1637,7 @@ call_bind_status(struct rpc_task *task)
return; return;
case -ECONNREFUSED: /* connection problems */ case -ECONNREFUSED: /* connection problems */
case -ECONNRESET: case -ECONNRESET:
case -ECONNABORTED:
case -ENOTCONN: case -ENOTCONN:
case -EHOSTDOWN: case -EHOSTDOWN:
case -EHOSTUNREACH: case -EHOSTUNREACH:
...@@ -1707,7 +1708,9 @@ call_connect_status(struct rpc_task *task) ...@@ -1707,7 +1708,9 @@ call_connect_status(struct rpc_task *task)
return; return;
case -ECONNREFUSED: case -ECONNREFUSED:
case -ECONNRESET: case -ECONNRESET:
case -ECONNABORTED:
case -ENETUNREACH: case -ENETUNREACH:
case -EHOSTUNREACH:
/* retry with existing socket, after a delay */ /* retry with existing socket, after a delay */
rpc_delay(task, 3*HZ); rpc_delay(task, 3*HZ);
if (RPC_IS_SOFTCONN(task)) if (RPC_IS_SOFTCONN(task))
...@@ -1807,6 +1810,7 @@ call_transmit_status(struct rpc_task *task) ...@@ -1807,6 +1810,7 @@ call_transmit_status(struct rpc_task *task)
break; break;
} }
case -ECONNRESET: case -ECONNRESET:
case -ECONNABORTED:
case -ENOTCONN: case -ENOTCONN:
case -EPIPE: case -EPIPE:
rpc_task_force_reencode(task); rpc_task_force_reencode(task);
...@@ -1916,8 +1920,9 @@ call_status(struct rpc_task *task) ...@@ -1916,8 +1920,9 @@ call_status(struct rpc_task *task)
xprt_conditional_disconnect(req->rq_xprt, xprt_conditional_disconnect(req->rq_xprt,
req->rq_connect_cookie); req->rq_connect_cookie);
break; break;
case -ECONNRESET:
case -ECONNREFUSED: case -ECONNREFUSED:
case -ECONNRESET:
case -ECONNABORTED:
rpc_force_rebind(clnt); rpc_force_rebind(clnt);
rpc_delay(task, 3*HZ); rpc_delay(task, 3*HZ);
case -EPIPE: case -EPIPE:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment