SUNRPC: Ensure xprt_connect_status handles all potential connection errors
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 31 Dec 2013 18:13:30 +0000 (13:13 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 31 Dec 2013 18:42:22 +0000 (13:42 -0500)
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>
net/sunrpc/xprt.c

index 04199bc8416f0c3bd3add838381db36f12130144..ddd198e90292ddc9ffa5fb893057e5bed0aa1ff3 100644 (file)
@@ -749,6 +749,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;