NFSD: Skip sending CB_RECALL_ANY when the backchannel isn't up
Subsystems (2)
[email protected]
maintainerRFC PATCH 1/1 NFSD: Skip sending CB_RECALL_ANY when the backchannel isn't up
From: Chuck Lever <[email protected]>
NFSD sends CB_RECALL_ANY to clients when the server is low on memory or that client has a large number of delegations outstanding.
We've seen cases where NFSD attempts to send CB_RECALL_ANY requests to disconnected clients, and gets confused. These calls never go anywhere if a backchannel transport to the target client isn't available. Before the server can send any backchannel operation, the client has to connect first and then do a BIND_CONN_TO_SESSION.
This patch doesn't address the root cause of the confusion, but there's no need to queue up these optional operations if they can't go anywhere.
--- fs/nfsd/nfs4state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/nfsd/nfs4state.c +2 -1
@@ -6867,7 +6867,8 @@ deleg_reaper(struct nfsd_net *nn) clp->cl_ra_time < 5)) {continue ; } -list_add (&clp->cl_ra_cblist, &cblist); +if (clp->cl_cb_state ==NFSD4_CB_UP ) +list_add (&clp->cl_ra_cblist, &cblist);/* release in nfsd4_cb_recall_any_release */ kref_get (&clp->cl_nfsdfs.cl_ref);
Signature · 1 line
2.47.0
Quoted 26 lines · On Tue, 2025-01-14 at 17:09 -0500, [email protected] wrote:
From: Chuck Lever <[email protected]>
NFSD sends
CB_RECALL_ANYto clients when the server is low on memory or that client has a large number of delegations outstanding.We've seen cases where NFSD attempts to send
CB_RECALL_ANYrequests to disconnected clients, and gets confused. These calls never go anywhere if a backchannel transport to the target client isn't available. Before the server can send any backchannel operation, the client has to connect first and then do aBIND_CONN_TO_SESSION.This patch doesn't address the root cause of the confusion, but there's no need to queue up these optional operations if they can't go anywhere.
Fixes 44df6f439a17 ("NFSD: add delegation reaper to react to low memory condition")Signed-off-by Chuck Lever <[email protected]>--- fs/nfsd/nfs4state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/nfsd/nfs4state.c +0
-0
fs/nfsd/nfs4state.c deleg_reaper(struct nfsd_net *nn) · line 6874
Quoted 9 lines
fs/nfsd/nfs4state.c +2
-1@@ -6867,7 +6867,8 @@ deleg_reaper(struct nfsd_net *nn) clp->cl_ra_time < 5)) {continue ; } -list_add (&clp->cl_ra_cblist, &cblist); +if (clp->cl_cb_state ==NFSD4_CB_UP ) +list_add (&clp->cl_ra_cblist, &cblist);/* release in nfsd4_cb_recall_any_release */ kref_get (&clp->cl_nfsdfs.cl_ref);
Sounds like a reasonable thing to do.