All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] NFSv4: handle ERR_GRACE on delegation recalls
@ 2025-08-11 18:18 Olga Kornievskaia
  2025-09-12 14:21 ` Olga Kornievskaia
  0 siblings, 1 reply; 14+ messages in thread
From: Olga Kornievskaia @ 2025-08-11 18:18 UTC (permalink / raw)
  To: trondmy, anna.schumaker; +Cc: linux-nfs

RFC7530 states that clients should be prepared for the return of
NFS4ERR_GRACE errors for non-reclaim lock and I/O requests.

Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
---
 fs/nfs/nfs4proc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 341740fa293d..fa9b81300604 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -7867,10 +7867,10 @@ int nfs4_lock_delegation_recall(struct file_lock *fl, struct nfs4_state *state,
 		return err;
 	do {
 		err = _nfs4_do_setlk(state, F_SETLK, fl, NFS_LOCK_NEW);
-		if (err != -NFS4ERR_DELAY)
+		if (err != -NFS4ERR_DELAY && err != -NFS4ERR_GRACE)
 			break;
 		ssleep(1);
-	} while (err == -NFS4ERR_DELAY);
+	} while (err == -NFS4ERR_DELAY || err == -NFSERR_GRACE);
 	return nfs4_handle_delegation_recall_error(server, state, stateid, fl, err);
 }
 
-- 
2.47.1


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

end of thread, other threads:[~2025-09-30 17:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-11 18:18 [PATCH 1/1] NFSv4: handle ERR_GRACE on delegation recalls Olga Kornievskaia
2025-09-12 14:21 ` Olga Kornievskaia
2025-09-12 14:29   ` Trond Myklebust
2025-09-12 14:41     ` Olga Kornievskaia
2025-09-12 15:11       ` Trond Myklebust
2025-09-12 16:04         ` Olga Kornievskaia
2025-09-29 17:49           ` Olga Kornievskaia
2025-09-30 14:01             ` Chuck Lever
2025-09-30 14:29               ` Olga Kornievskaia
2025-09-30 14:32                 ` Olga Kornievskaia
2025-09-30 14:37                   ` Chuck Lever
2025-09-30 14:56                     ` Olga Kornievskaia
2025-09-30 15:19                       ` Chuck Lever
2025-09-30 17:00             ` Olga Kornievskaia

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.