Skip to content

Commit 045c5eb

Browse files
committed
nfsd: nfserr_jukebox in nlm_fopen should lead to a retry
JIRA: https://issues.redhat.com/browse/RHEL-115855 commit a082e4b Author: Olga Kornievskaia <okorniev@redhat.com> Date: Thu Aug 21 16:31:46 2025 -0400 nfsd: nfserr_jukebox in nlm_fopen should lead to a retry 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. Fixes: d343fce ("[PATCH] knfsd: Allow lockd to drop replies as appropriate") Cc: stable@vger.kernel.org # v6.6 Signed-off-by: Olga Kornievskaia <okorniev@redhat.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Scott Mayhew <smayhew@redhat.com>
1 parent bf36cf8 commit 045c5eb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

fs/nfsd/lockd.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,21 @@ nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp,
4848
switch (nfserr) {
4949
case nfs_ok:
5050
return 0;
51+
case nfserr_jukebox:
52+
/* this error can indicate a presence of a conflicting
53+
* delegation to an NLM lock request. Options are:
54+
* (1) For now, drop this request and make the client
55+
* retry. When delegation is returned, client's lock retry
56+
* will complete.
57+
* (2) NLM4_DENIED as per "spec" signals to the client
58+
* that the lock is unavailable now but client can retry.
59+
* Linux client implementation does not. It treats
60+
* NLM4_DENIED same as NLM4_FAILED and errors the request.
61+
* (3) For the future, treat this as blocked lock and try
62+
* to callback when the delegation is returned but might
63+
* not have a proper lock request to block on.
64+
*/
65+
fallthrough;
5166
case nfserr_dropit:
5267
return nlm_drop_reply;
5368
case nfserr_stale:

0 commit comments

Comments
 (0)