NFSD: Move callback_wq into struct nfs4_client
authorChuck Lever <chuck.lever@oracle.com>
Mon, 1 Apr 2024 20:05:39 +0000 (16:05 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 6 May 2024 13:07:16 +0000 (09:07 -0400)
commit38f080f3cd19fbd87eb7f6c4f6c236c1c9df6fba
treecf5456b44e28ebb914582184cc81492d700e6293
parent56c35f43eef013579c76c007ba1f386d8c2cac14
NFSD: Move callback_wq into struct nfs4_client

Commit 883820366747 ("nfsd: update workqueue creation") made the
callback_wq single-threaded, presumably to protect modifications of
cl_cb_client. See documenting comment for nfsd4_process_cb_update().

However, cl_cb_client is per-lease. There's no other reason that all
callback operations need to be dispatched via a single thread. The
single threading here means all client callbacks can be blocked by a
problem with one client.

Change the NFSv4 callback client so it serializes per-lease instead
of serializing all NFSv4 callback operations on the server.

Reported-by: Dai Ngo <dai.ngo@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4callback.c
fs/nfsd/nfs4state.c
fs/nfsd/state.h