Whamcloud - gitweb
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>