]> git.baikalelectronics.ru Git - kernel.git/commitdiff
SUNRPC: call_connect_status should handle -EPROTO
authorChuck Lever <chuck.lever@oracle.com>
Mon, 23 Dec 2019 15:28:44 +0000 (10:28 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 15 Jan 2020 15:54:31 +0000 (10:54 -0500)
The xprtrdma connect logic can return -EPROTO if the underlying
device or network path does not support RDMA. This can happen
after a device removal/insertion.

- When SOFTCONN is set, EPROTO is a permanent error.

- When SOFTCONN is not set, EPROTO is treated as a temporary error.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/clnt.c

index a3379765605d160dee186bb6743ed8e53756df07..7324b21f923e6816399168a1ad9ef3dd9fb362bc 100644 (file)
@@ -2130,6 +2130,7 @@ call_connect_status(struct rpc_task *task)
        case -ENETUNREACH:
        case -EHOSTUNREACH:
        case -EPIPE:
+       case -EPROTO:
                xprt_conditional_disconnect(task->tk_rqstp->rq_xprt,
                                            task->tk_rqstp->rq_connect_cookie);
                if (RPC_IS_SOFTCONN(task))