Whamcloud - gitweb
LU-13017 tests: disable statahead_agl for sanity test_56ra 67/39667/5
authorMr NeilBrown <neilb@suse.de>
Thu, 13 Aug 2020 05:26:54 +0000 (15:26 +1000)
committerOleg Drokin <green@whamcloud.com>
Mon, 12 Oct 2020 05:44:40 +0000 (05:44 +0000)
commit3e04c4f0757c228fc9a1967617e12f3e73e8ffaf
tree9ed0602bef9fc88372a87c5b068e366daba4f5d5
parenta558006b83dfe32798cce644aa888c37e805d50b
LU-13017 tests: disable statahead_agl for sanity test_56ra

The sanity test_56ra can fail because statahead_agl can cause extra
glimpse request.

If a stat() systemcall is made after an AGL glimpse request is sent,
but before the reply has been received, the code handling the stat
cannot see that glimpse request and so will send another.  This
elevates the number of requests counted.

There is a parameter (statahead_agl) which make it easy to disable the
AGL, but it isn't implemented properly.  Specifically, inodes can
still be added to the sai_agls list when agl is disabled.  They will
never be removed, which causes an assertion to fail.

To clean this up, remove the sai_agl_valid flag, and use a test on
sai_task being non-NULL instead.  Also check agl_should_run() while
locked against ->sai_task changing, and before adding anything
to lli_agl_list.

We don't need the 'added' variable.  It is perfectly OK to wake_up the
sai_agl_task *before* adding to the list as long is that is all done
under the lock.  The task will wait for the lock before checking the
list, so it won't see it being empty.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I12c4e447104a86b3f48eaf57b6cf7ce4b41cc6de
Reviewed-on: https://review.whamcloud.com/39667
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/llite_internal.h
lustre/llite/statahead.c
lustre/tests/sanity.sh