Whamcloud - gitweb
LU-12780 quota: don't use ptlrpc_thead of qmt_pool_recalc
Rather than using ptlrpc_thread, use native kthreads functionality.
kthread_stop() / kthread_should_stop() is used to signal early
shutdown.
kthread_park()/kthread_unpark() is used to ensure that thread
actually starts (else kf kthread_stop() was called too early,
the thread function might not run and the ref on the pool
might not be dropped.
As the thread can stop spontaneiously or on request we use xchg() on
the thread pointer to disambiuate in the case of a race and wait as
needed.
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I56b03a4735268bc808448a4c7b9e20c8625e2eee
Reviewed-on: https://review.whamcloud.com/38612
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>