summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2022-05-31 11:03:06 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-25 11:49:15 +0200
commit22176ab5c3dfacb9a0e31e173768dbc5b3907b5d (patch)
tree2fdf5b59af7d1fa964cee5027bc283d54bd5e17e
parent32a6e1c1e85832012983a1d656a0e439c1c0775c (diff)
downloadlinux-22176ab5c3dfacb9a0e31e173768dbc5b3907b5d.tar.gz
linux-22176ab5c3dfacb9a0e31e173768dbc5b3907b5d.tar.bz2
linux-22176ab5c3dfacb9a0e31e173768dbc5b3907b5d.zip
pNFS: Don't keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE
[ Upstream commit fe44fb23d6ccde4c914c44ef74ab8d9d9ba02bea ] If the server tells us that a pNFS layout is not available for a specific file, then we should not keep pounding it with further layoutget requests. Fixes: 183d9e7b112a ("pnfs: rework LAYOUTGET retry handling") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--fs/nfs/pnfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index a7d638bfb46b..cfb1fe5dfb1e 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -2045,6 +2045,12 @@ lookup_again:
case -ERECALLCONFLICT:
case -EAGAIN:
break;
+ case -ENODATA:
+ /* The server returned NFS4ERR_LAYOUTUNAVAILABLE */
+ pnfs_layout_set_fail_bit(
+ lo, pnfs_iomode_to_fail_bit(iomode));
+ lseg = NULL;
+ goto out_put_layout_hdr;
default:
if (!nfs_error_is_fatal(PTR_ERR(lseg))) {
pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode));