]> git.baikalelectronics.ru Git - kernel.git/commit
NFSD: add courteous server support for thread with only delegation
authorDai Ngo <dai.ngo@oracle.com>
Mon, 2 May 2022 21:19:21 +0000 (14:19 -0700)
committerChuck Lever <chuck.lever@oracle.com>
Thu, 19 May 2022 16:25:39 +0000 (12:25 -0400)
commitb2af86439d532ecdd8a9e50a6bcb383f1cb28604
treea4e80b23a317d4dc3e758de1aabdd992167388f5
parente9345f2aa6c7cd54b965dafbeb60d636cc3d16f9
NFSD: add courteous server support for thread with only delegation

This patch provides courteous server support for delegation only.
Only expired client with delegation but no conflict and no open
or lock state is allowed to be in COURTESY state.

Delegation conflict with COURTESY/EXPIRABLE client is resolved by
setting it to EXPIRABLE, queue work for the laundromat and return
delay to the caller. Conflict is resolved when the laudromat runs
and expires the EXIRABLE client while the NFS client retries the
OPEN request. Local thread request that gets conflict is doing the
retry in _break_lease.

Client in COURTESY or EXPIRABLE state is allowed to reconnect and
continues to have access to its state. Access to the nfs4_client by
the reconnecting thread and the laundromat is serialized via the
client_lock.

Reviewed-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4state.c
fs/nfsd/nfsd.h
fs/nfsd/state.h