Whamcloud - gitweb
LU-15562 statahead: using try lock for batched RPCs 49/46549/16
authorQian Yingjin <qian@ddn.com>
Fri, 18 Feb 2022 08:07:54 +0000 (03:07 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 31 May 2023 19:04:18 +0000 (19:04 +0000)
commit58549f9780418d548c9af284dd39b6a436878a7a
tree699dfcaa2df99504dd6be46a1b5d04add27148b4
parent02ac821653a0b2d897442e276d0afc31755064a4
LU-15562 statahead: using try lock for batched RPCs

To avoid the possible deadlock between the batched statahead RPC
and rename()/migrate() operation, we use trylock to obtain the DLM
PR ibits lock for file attributes in a batched statahead RPC.
A failed trylock means that other users maybe modify the directory
simultaneously as the server only grants read lock to a client in
current Lustre design which is compatible with the PR lock for
attributes in stat()-ahead.
When a trylock failed, the MDT reports the conflict with the error
code -EBUSY, and the client stops the statahead immediately.

In this patch, we set "statahead_batch_max" with 64 to enable
batched statahead by default.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I38394b1547e18ad156f94e49cd81aaef2f6fafb5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/46549
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/llite_internal.h
lustre/mdt/mdt_handler.c