Whamcloud - gitweb
LU-17446 ldlm: Do not wait for BL AST RPC completion on cancel
authorOleg Drokin <green@whamcloud.com>
Fri, 19 Jan 2024 05:24:43 +0000 (00:24 -0500)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 29 Jan 2024 08:54:00 +0000 (08:54 +0000)
commitcfd5411db998c2b0427e310a19b8741b1ec3644e
treef3498a14e258cb96a6fa24d3d68f8616fb2a418f
parenteabd50fb756be7f55b32576e464079993cc02d1d
LU-17446 ldlm: Do not wait for BL AST RPC completion on cancel

If we have sent an AST RPC to the client and while it's in flight
the client sent in the cancel, sometimes (esp. if AST or reply
to it are lost) even though the lock is already cancelled, whoever
is waiting on it is still stuck while trying to resend ASTs.
And in the end the client is not even evicted because the lock cancel
did come and all is fine, but it can add over a hundred seconds
to lock granting process in some non-ideal circumstances.

For simplicity we only treat Blocking ASTs like this, since we
can only have a single one of this kind.

This is adding additional pointer to struct ldlm_lock, but that is
already 560 bytes so does not really mean much.

Lustre-change: https://review.whamcloud.com/53739
Lustre-commit: TBD (from d4b782c249377276dc9f6ddbf0fab34956d57af6)

Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: Id2231bc3bfc3e094faae2872fe09f3c330d441df
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53840
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/lustre_dlm.h
lustre/include/lustre_net.h
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_lockd.c
lustre/ptlrpc/client.c
lustre/ptlrpc/niobuf.c