Whamcloud - gitweb
LU-18523 tests: wait statahead thread quit during cleanup 37/57337/2
authorQian Yingjin <qian@ddn.com>
Mon, 2 Dec 2024 06:10:04 +0000 (14:10 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 2 Jan 2025 20:51:57 +0000 (20:51 +0000)
commit1a6967eff6663c70e15f14e853f531316ad9eab5
tree5ca7dc0b260843727b745a359fde9b9fe6ecddce
parent7155b844c39f0d444b6b94cad73ab7c9f6a8818f
LU-18523 tests: wait statahead thread quit during cleanup

The list pattern statahead can optimize the stat() workload as
follows:
- opendir() will authorize the statahead
- readdir() to get the name and inode number for the dentries
- do stat() on the dentries one by one
- closedir() will deauthorize the statahead
After closedir() is called, the statahead thread will quit.

However, this is not same for fname pattern statahead which
workload is calling stat() on the files in Alphabetic sorting
order of the file name and does not include by opendir/closedir()
call pair.
For a fname pattern statahead, the statahead thread will wait for
a certain time period (30s by default) and it is not quit until
the user is no longer using the directory (traverse and stat) for
this long time.

Thus after fname statahead pattern is enabled by default, we must
wait for stat-ahead thread quit during cleanup. Otherwise, it will
faile sanity/test_65j as follow:
"cln..There are ll_sa thread not exit!"

Test-Parameters: trivial
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I510073c38167fd07fc6343dc14a509754bd1eace
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57337
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh