From: Olga Kornievskaia <okorniev@redhat.com>
To: chuck.lever@oracle.com, jlayton@kernel.org
Cc: linux-nfs@vger.kernel.org, neil@brown.name, Dai.Ngo@oracle.com,
tom@talpey.com
Subject: [RFC PATCH 1/2] nfsd: nfserr_jukebox in nlm_fopen should lead to a retry
Date: Mon, 11 Aug 2025 14:18:39 -0400 [thread overview]
Message-ID: <20250811181840.99269-2-okorniev@redhat.com> (raw)
In-Reply-To: <20250811181840.99269-1-okorniev@redhat.com>
When v3 NLM request finds a conflicting delegation, it triggers
a delegation recall and nfsd_open fails with EAGAIN. nfsd_open
then translates EAGAIN into nfserr_jukebox. In nlm_fopen, instead
of returning nlm_failed for when there is a conflicting delegation,
drop this NLM request so that the client retries. Once delegation
is recalled and if a local lock is claimed, a retry would lead to
nfsd returning a nlm_lck_blocked error or a successful nlm lock.
Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
---
fs/nfsd/lockd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/nfsd/lockd.c b/fs/nfsd/lockd.c
index edc9f75dc75c..ad3e461f30c0 100644
--- a/fs/nfsd/lockd.c
+++ b/fs/nfsd/lockd.c
@@ -57,6 +57,7 @@ nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp,
switch (nfserr) {
case nfs_ok:
return 0;
+ case nfserr_jukebox:
case nfserr_dropit:
return nlm_drop_reply;
case nfserr_stale:
--
2.47.1
next prev parent reply other threads:[~2025-08-11 18:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 18:18 [RFC PATCH 0/2] nfsd/lockd: v3/v4 lock conflict in presence of delegations Olga Kornievskaia
2025-08-11 18:18 ` Olga Kornievskaia [this message]
2025-08-11 19:10 ` [RFC PATCH 1/2] nfsd: nfserr_jukebox in nlm_fopen should lead to a retry Jeff Layton
2025-08-11 19:23 ` Jeff Layton
2025-08-11 19:32 ` Olga Kornievskaia
2025-08-11 19:56 ` Jeff Layton
2025-08-11 19:57 ` Chuck Lever
2025-08-11 18:18 ` [RFC PATCH 2/2] lockd: while grace prefer to fail with nlm_lck_denied_grace_period Olga Kornievskaia
2025-08-11 19:14 ` Jeff Layton
2025-08-11 19:59 ` Olga Kornievskaia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250811181840.99269-2-okorniev@redhat.com \
--to=okorniev@redhat.com \
--cc=Dai.Ngo@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).