Commit 7836d754 authored by Trond Myklebust's avatar Trond Myklebust

pNFS/flexfiles: Report RDMA connection errors to the server

The RPC/RDMA driver will return -EPROTO and -ENODEV as connection errors
under certain circumstances. Make sure that we handle them and report
them to the server. If not, we can end up cycling forever in a
LAYOUTGET/LAYOUTRETURN loop.

Fixes: a12f996d ("NFSv4/pNFS: Use connections to a DS that are all of the same protocol family")
Cc: stable@vger.kernel.org # 5.11.x
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 9597152d
...@@ -1131,6 +1131,8 @@ static int ff_layout_async_handle_error_v4(struct rpc_task *task, ...@@ -1131,6 +1131,8 @@ static int ff_layout_async_handle_error_v4(struct rpc_task *task,
case -EIO: case -EIO:
case -ETIMEDOUT: case -ETIMEDOUT:
case -EPIPE: case -EPIPE:
case -EPROTO:
case -ENODEV:
dprintk("%s DS connection error %d\n", __func__, dprintk("%s DS connection error %d\n", __func__,
task->tk_status); task->tk_status);
nfs4_delete_deviceid(devid->ld, devid->nfs_client, nfs4_delete_deviceid(devid->ld, devid->nfs_client,
...@@ -1236,6 +1238,8 @@ static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg, ...@@ -1236,6 +1238,8 @@ static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg,
case -ENOBUFS: case -ENOBUFS:
case -EPIPE: case -EPIPE:
case -EPERM: case -EPERM:
case -EPROTO:
case -ENODEV:
*op_status = status = NFS4ERR_NXIO; *op_status = status = NFS4ERR_NXIO;
break; break;
case -EACCES: case -EACCES:
......
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