From 26bb728bce2889d126c274cfc4f1e8cafd9d5dcd Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mar 20 2024 01:32:55 +0000 Subject: NFSD: Retransmit callbacks after client reconnects (git-fixes). --- diff --git a/patches.suse/NFSD-Retransmit-callbacks-after-client-reconnects.patch b/patches.suse/NFSD-Retransmit-callbacks-after-client-reconnects.patch new file mode 100644 index 0000000..bb3ec92 --- /dev/null +++ b/patches.suse/NFSD-Retransmit-callbacks-after-client-reconnects.patch @@ -0,0 +1,49 @@ +From: Chuck Lever +Date: Fri, 26 Jan 2024 12:45:36 -0500 +Subject: [PATCH] NFSD: Retransmit callbacks after client reconnects +Git-commit: 43b02dba110e63e5f8180248920032422ac8c1e4 +Patch-mainline: v6.9-rc1 +References: git-fixes + +NFSv4.1 clients assume that if they disconnect, that will force the +server to resend pending callback operations once a fresh connection +has been established. + +Turns out NFSD has not been resending after reconnect. + +Fixes: 7ba6cad6c88f ("nfsd: New helper nfsd4_cb_sequence_done() for processing more cb errors") +Reviewed-by: Jeff Layton +Reviewed-by: Benjamin Coddington +Signed-off-by: Chuck Lever +Acked-by: NeilBrown + +--- + fs/nfsd/nfs4callback.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +--- a/fs/nfsd/nfs4callback.c ++++ b/fs/nfsd/nfs4callback.c +@@ -1131,12 +1131,21 @@ static bool nfsd4_cb_sequence_done(struc + break; + case -ESERVERFAULT: + ++session->se_cb_seq_nr; +- fallthrough; ++ nfsd4_mark_cb_fault(cb->cb_clp, cb->cb_seq_status); ++ ret = false; ++ break; + case 1: ++ /* ++ * cb_seq_status remains 1 if an RPC Reply was never ++ * received. NFSD can't know if the client processed ++ * the CB_SEQUENCE operation. Ask the client to send a ++ * DESTROY_SESSION to recover. ++ */ ++ fallthrough; + case -NFS4ERR_BADSESSION: + nfsd4_mark_cb_fault(cb->cb_clp, cb->cb_seq_status); + ret = false; +- break; ++ goto need_restart; + case -NFS4ERR_DELAY: + cb->cb_seq_status = 1; + if (!rpc_restart_call(task)) diff --git a/series.conf b/series.conf index 90a70e9..fbe5505 100644 --- a/series.conf +++ b/series.conf @@ -45595,6 +45595,7 @@ patches.suse/NFSD-Reset-cb_seq_status-after-NFS4ERR_DELAY.patch patches.suse/NFSD-Convert-the-callback-workqueue-to-use-delayed_w.patch patches.suse/NFSD-Reschedule-CB-operations-when-backchannel-rpc_c.patch + patches.suse/NFSD-Retransmit-callbacks-after-client-reconnects.patch patches.suse/doc-guide-kernel-doc-tell-about-object-like-macros.patch patches.suse/wifi-b43-Stop-wake-correct-queue-in-DMA-Tx-path-when.patch patches.suse/wifi-b43-Stop-wake-correct-queue-in-PIO-Tx-path-when.patch