]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit2c343152c813b73ba76e38af02deec3e12216fde
tree5972b50bc160207231effb90a3f493ebda8ff73b
parentd037885d275bd7c9c4a920c7ee2b944ac57bb632
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