From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Chuck Lever <chuck.lever@oracle•com>,
Trond Myklebust <trondmy@gmail•com>
Cc: Jeff Layton <jlayton@kernel•org>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>,
Trond Myklebust <trond.myklebust@hammerspace•com>
Subject: linux-next: manual merge of the nfsd tree with the nfs tree
Date: Fri, 21 Mar 2025 09:11:51 +1100 [thread overview]
Message-ID: <20250321091151.2fd07db3@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 2935 bytes --]
Hi all,
Today's linux-next merge of the nfsd tree got a conflict in:
fs/nfsd/nfs4callback.c
between commit:
11a149e09d58 ("sunrpc: make rpc_restart_call() and rpc_restart_call_prepare() void return")
from the nfs tree and commits:
6c1cefb84b3d ("nfsd: lift NFSv4.0 handling out of nfsd4_cb_sequence_done()")
f049911b5b98 ("nfsd: only check RPC_SIGNALLED() when restarting rpc_task")
from the nfsd tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc fs/nfsd/nfs4callback.c
index 654bee80acef,ec6539cec0fe..000000000000
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@@ -1381,41 -1384,42 +1384,43 @@@ static bool nfsd4_cb_sequence_done(stru
fallthrough;
case -NFS4ERR_BADSESSION:
nfsd4_mark_cb_fault(cb->cb_clp);
- ret = false;
- goto need_restart;
+ goto requeue;
case -NFS4ERR_DELAY:
cb->cb_seq_status = 1;
- if (RPC_SIGNALLED(task) || !rpc_restart_call(task))
+ rpc_restart_call(task);
++ if (RPC_SIGNALLED(task))
+ goto requeue;
rpc_delay(task, 2 * HZ);
return false;
- case -NFS4ERR_BADSLOT:
- goto retry_nowait;
case -NFS4ERR_SEQ_MISORDERED:
- if (session->se_cb_seq_nr[cb->cb_held_slot] != 1) {
- session->se_cb_seq_nr[cb->cb_held_slot] = 1;
- goto retry_nowait;
- }
- break;
+ case -NFS4ERR_BADSLOT:
+ /*
+ * A SEQ_MISORDERED or BADSLOT error means that the client and
+ * server are out of sync as to the backchannel parameters. Mark
+ * the backchannel faulty and restart the RPC, but leak the slot
+ * so that it's no longer used.
+ */
+ nfsd4_mark_cb_fault(cb->cb_clp);
+ cb->cb_held_slot = -1;
+ goto retry_nowait;
default:
nfsd4_mark_cb_fault(cb->cb_clp);
}
trace_nfsd_cb_free_slot(task, cb);
nfsd41_cb_release_slot(cb);
-
- if (RPC_SIGNALLED(task))
- goto need_restart;
- out:
return ret;
retry_nowait:
- rpc_restart_call_prepare(task);
- ret = false;
- goto out;
- need_restart:
- if (!test_bit(NFSD4_CLIENT_CB_KILL, &clp->cl_flags)) {
- trace_nfsd_cb_restart(clp, cb);
- task->tk_status = 0;
- cb->cb_need_restart = true;
+ /*
+ * RPC_SIGNALLED() means that the rpc_client is being torn down and
+ * (possibly) recreated. Requeue the call in that case.
+ */
+ if (!RPC_SIGNALLED(task)) {
- if (rpc_restart_call_prepare(task))
- return false;
++ rpc_restart_call_prepare(task);
++ return false;
}
+ requeue:
+ nfsd41_cb_release_slot(cb);
+ nfsd4_requeue_cb(task, cb);
return false;
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2025-03-20 22:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-20 22:11 Stephen Rothwell [this message]
2025-03-21 13:32 ` linux-next: manual merge of the nfsd tree with the nfs tree Chuck Lever
2025-03-21 13:37 ` Trond Myklebust
2025-03-21 13:40 ` Chuck Lever
-- strict thread matches above, loose matches on Subject: below --
2021-10-24 23:59 Stephen Rothwell
2021-10-25 0:10 ` Stephen Rothwell
2015-02-10 0:55 Stephen Rothwell
2015-02-10 15:34 ` J. Bruce Fields
2009-08-10 0:58 Stephen Rothwell
2009-08-10 16:05 ` J. Bruce Fields
2009-08-10 18:08 ` Trond Myklebust
2009-08-10 18:17 ` J. Bruce Fields
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=20250321091151.2fd07db3@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=chuck.lever@oracle$(echo .)com \
--cc=jlayton@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=trond.myklebust@hammerspace$(echo .)com \
--cc=trondmy@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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