Whamcloud - gitweb
LU-14976 nrs: change nrs policies at run time
This patch take extra references on policy to avoid stop a NRS policy
with pending/queued request in it.
It uses a new refcount_t "pol_start_ref" for this purpose to keep
track of policy usage in started state. It enables to safely stop a
policy without "nrs_lock" and avoids to sleep in the spinlock.
It adds a wait queue field "pol_wq" in "struct ptlrpc_nrs_policy" to
wait all queued request in a stopping policy to be drained when
restarting policy with a different argument.
Add test sanityn 77r for this use case.
Test-Parameters: testlist=sanityn env=ONLY=77r,ONLY_REPEAT=20
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I1425f52324f755f1b76ea8210de52647c072a592
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48523
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>