[PATCH v6 0/7] nfsd: CB_SEQUENCE error handling fixes and cleanups

Jeff Layton posted 7 patches 12 months ago
fs/nfsd/nfs4callback.c | 100 +++++++++++++++++++++++++++----------------------
1 file changed, 56 insertions(+), 44 deletions(-)
[PATCH v6 0/7] nfsd: CB_SEQUENCE error handling fixes and cleanups
Posted by Jeff Layton 12 months ago
This patch is mostly the same as the v5 series. Just small cleanups
and dropping of special NFS4ERR_SEQ_MISORDERED handling.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Changes in v6:
- Reorder patch to move v4.0 handling to earlier in series
- Drop special handling of NFS4ERR_SEQ_MISORDERED. Always treat it like NFS4ERR_BADSLOT.
- rename requeue_callback() to nfsd4_queue_cb()
- Comment and changelog cleanups
- Link to v5: https://lore.kernel.org/r/20250207-nfsd-6-14-v5-0-f3b54fb60dc0@kernel.org

Changes in v5:
- don't ignore return of rpc_restart_call() and rpc_restart_call_prepare()
- Break up the nfsd4_cb_sequence_done() error handling changes into multiple patches
- Link to v4: https://lore.kernel.org/r/20250207-nfsd-6-14-v4-0-1aa42c407265@kernel.org

Changes in v4:
- Hold back on session refcounting changes for now and just send CB_SEQUENCE
  error handling rework.
- Link to v3: https://lore.kernel.org/r/20250129-nfsd-6-14-v3-0-506e71e39e6b@kernel.org

Changes in v3:
- rename cb_session_changed to nfsd4_cb_session_changed
- rename restart_callback to requeue_callback, and rename need_restart:
  label to requeue:
- don't increment seq_nr on -ESERVERFAULT
- comment cleanups
- drop client-side rpc patch (will send separately)
- Link to v2: https://lore.kernel.org/r/20250129-nfsd-6-14-v2-0-2700c92f3e44@kernel.org

Changes in v2:
- make nfsd4_session be RCU-freed
- change code to keep reference to session over callback RPCs
- rework error handling in nfsd4_cb_sequence_done()
- move NFSv4.0 handling out of nfsd4_cb_sequence_done()
- Link to v1: https://lore.kernel.org/r/20250123-nfsd-6-14-v1-0-c1137a4fa2ae@kernel.org

---
Jeff Layton (7):
      nfsd: prepare nfsd4_cb_sequence_done() for error handling rework
      nfsd: lift NFSv4.0 handling out of nfsd4_cb_sequence_done()
      nfsd: always release slot when requeueing callback
      nfsd: only check RPC_SIGNALLED() when restarting rpc_task
      nfsd: when CB_SEQUENCE gets ESERVERFAULT don't increment seq_nr
      nfsd: handle NFS4ERR_BADSLOT on CB_SEQUENCE better
      nfsd: eliminate special handling of NFS4ERR_SEQ_MISORDERED

 fs/nfsd/nfs4callback.c | 100 +++++++++++++++++++++++++++----------------------
 1 file changed, 56 insertions(+), 44 deletions(-)
---
base-commit: 50934b1a613cabba2b917879c3e722882b72f628
change-id: 20250123-nfsd-6-14-b0797e385dc0

Best regards,
-- 
Jeff Layton <jlayton@kernel.org>
Re: [PATCH v6 0/7] nfsd: CB_SEQUENCE error handling fixes and cleanups
Posted by cel@kernel.org 12 months ago
From: Chuck Lever <chuck.lever@oracle.com>

On Sun, 09 Feb 2025 07:31:21 -0500, Jeff Layton wrote:
> This patch is mostly the same as the v5 series. Just small cleanups
> and dropping of special NFS4ERR_SEQ_MISORDERED handling.
> 
> 

Nice work. The comments and change logs contain good rationale
for the code modifications, and the new code should be easier
to maintain.

Applied to nfsd-testing, thanks!

[1/7] nfsd: prepare nfsd4_cb_sequence_done() for error handling rework
      commit: 61d4e0b9d8e47ec93a90f57f8ec76a5b7ba970ea
[2/7] nfsd: lift NFSv4.0 handling out of nfsd4_cb_sequence_done()
      commit: 62dc8f549352ed1a38738112f9cf946b7e97e10a
[3/7] nfsd: always release slot when requeueing callback
      commit: 8d09824221012b221cfc1caa76215c6b4bba3e24
[4/7] nfsd: only check RPC_SIGNALLED() when restarting rpc_task
      commit: dde7c58af30ee0dc13cc47c7d57da9102124597d
[5/7] nfsd: when CB_SEQUENCE gets ESERVERFAULT don't increment seq_nr
      commit: 90b44566f9024e0edc8373ef72e39bc162286bc5
[6/7] nfsd: handle NFS4ERR_BADSLOT on CB_SEQUENCE better
      commit: 7f7c89cb74dd8d5484837256bc14a77de8d91075
[7/7] nfsd: eliminate special handling of NFS4ERR_SEQ_MISORDERED
      commit: 58e65798b82f31aeb6c85c8db13179a0a1bf2b2f

--
Chuck Lever