Skip to content

Commit 9c8ecb9

Browse files
committed
Revert "NFSD: Reschedule CB operations when backchannel rpc_clnt is shut down"
The reverted commit attempted to enable NFSD to retransmit pending callback operations if an NFS client disconnects, but unintentionally introduces a hazardous behavior regression if the client becomes permanently unreachable while callback operations are still pending. A disconnect can occur due to network partition or if the NFS server needs to force the NFS client to retransmit (for example, if a GSS window under-run occurs). Reverting the commit will make NFSD behave the same as it did in v6.8 and before. Pending callback operations are permanently lost if the client connection is terminated before the client receives them. For some callback operations, this loss is not harmful. However, for CB_RECALL, the loss means a delegation might be revoked unnecessarily. For CB_OFFLOAD, pending COPY operations will never complete unless the NFS client subsequently sends an OFFLOAD_STATUS operation, which the Linux NFS client does not currently implement. These issues still need to be addressed somehow. Reported-by: Dai Ngo <[email protected]> Link: https://bugzilla.kernel.org/show_bug.cgi?id=218735 Signed-off-by: Chuck Lever <[email protected]>
1 parent 32cf5a4 commit 9c8ecb9

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

fs/nfsd/nfs4callback.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -986,14 +986,6 @@ static bool nfsd4_queue_cb(struct nfsd4_callback *cb)
986986
return queue_delayed_work(callback_wq, &cb->cb_work, 0);
987987
}
988988

989-
static void nfsd4_queue_cb_delayed(struct nfsd4_callback *cb,
990-
unsigned long msecs)
991-
{
992-
trace_nfsd_cb_queue(cb->cb_clp, cb);
993-
queue_delayed_work(callback_wq, &cb->cb_work,
994-
msecs_to_jiffies(msecs));
995-
}
996-
997989
static void nfsd41_cb_inflight_begin(struct nfs4_client *clp)
998990
{
999991
atomic_inc(&clp->cl_cb_inflight);
@@ -1502,16 +1494,8 @@ nfsd4_run_cb_work(struct work_struct *work)
15021494

15031495
clnt = clp->cl_cb_client;
15041496
if (!clnt) {
1505-
if (test_bit(NFSD4_CLIENT_CB_KILL, &clp->cl_flags))
1506-
nfsd41_destroy_cb(cb);
1507-
else {
1508-
/*
1509-
* XXX: Ideally, we could wait for the client to
1510-
* reconnect, but I haven't figured out how
1511-
* to do that yet.
1512-
*/
1513-
nfsd4_queue_cb_delayed(cb, 25);
1514-
}
1497+
/* Callback channel broken, or client killed; give up: */
1498+
nfsd41_destroy_cb(cb);
15151499
return;
15161500
}
15171501

0 commit comments

Comments
 (0)