OSDN Git Service

NFSD: add support for lock conflict to courteous server
authorDai Ngo <dai.ngo@oracle.com>
Mon, 2 May 2022 21:19:26 +0000 (14:19 -0700)
committerChuck Lever <chuck.lever@oracle.com>
Thu, 19 May 2022 16:25:39 +0000 (12:25 -0400)
commit27431affb0dbc259ac6ffe6071243a576c8f38f1
tree5972b50bc160207231effb90a3f493ebda8ff73b
parent2443da2259e97688f93d64d17ab69b15f466078a
NFSD: add support for lock conflict to courteous server

This patch allows expired client with lock state to be in COURTESY
state. Lock conflict with COURTESY client is resolved by the fs/lock
code using the lm_lock_expirable and lm_expire_lock callback in the
struct lock_manager_operations.

If conflict client is in COURTESY state, set it to EXPIRABLE and
schedule the laundromat to run immediately to expire the client. The
callback lm_expire_lock waits for the laundromat to flush its work
queue before returning to caller.

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