All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] pNFS: Don't keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE
@ 2022-05-31 15:03 trondmy
  2022-05-31 15:03 ` [PATCH 2/2] pNFS: Avoid a live lock condition in pnfs_update_layout() trondmy
  0 siblings, 1 reply; 2+ messages in thread
From: trondmy @ 2022-05-31 15:03 UTC (permalink / raw)
  To: Olga Kornievskaia, Anna Schumaker; +Cc: linux-nfs

From: Trond Myklebust <trond.myklebust@hammerspace.com>

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>
---
 fs/nfs/pnfs.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 68a87be3e6f9..4609e641710e 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -2152,6 +2152,12 @@ pnfs_update_layout(struct inode *ino,
 		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));
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-31 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-31 15:03 [PATCH 1/2] pNFS: Don't keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE trondmy
2022-05-31 15:03 ` [PATCH 2/2] pNFS: Avoid a live lock condition in pnfs_update_layout() trondmy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.