From: Trond Myklebust Date: Wed, 18 May 2022 21:08:58 +0000 (-0400) Subject: pNFS/files: Handle RDMA connection errors correctly X-Git-Tag: microblaze-v6.1~41^2~42 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=431794e67e238e6fd170499a14fd2abf0a16b5bd;p=linux-2.6-microblaze.git pNFS/files: Handle RDMA connection errors correctly The RPC/RDMA driver will return -EPROTO and -ENODEV as connection errors under certain circumstances. Make sure that we handle them correctly and avoid cycling forever in a LAYOUTGET/LAYOUTRETURN loop. Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c index 2b2661582bbe..ad34a33b0737 100644 --- a/fs/nfs/filelayout/filelayout.c +++ b/fs/nfs/filelayout/filelayout.c @@ -181,6 +181,8 @@ static int filelayout_async_handle_error(struct rpc_task *task, case -EIO: case -ETIMEDOUT: case -EPIPE: + case -EPROTO: + case -ENODEV: dprintk("%s DS connection error %d\n", __func__, task->tk_status); nfs4_mark_deviceid_unavailable(devid);