Whamcloud - gitweb
LU-12780 quota: don't use ptlrpc_thread for qsd_upd_thread()
Instead of ptlrpc_thread, use native kthread functionality.
- for startup, perform allocations before starting the thread,
and use a completion to ensure thread function runs before
kthread_stop() is ever called, so cleanup is guaranteed to
happen.
- for shutdown, use kthread_stop/kthread_should_stop
- for signalling the thread, use wake_up_process. The thread
sets TASK_IDLE while checking if there is anything to do,
and TASK_RUNNING when it finds something to work on, so
the schedule_timeout() only blocks if there was nothing to do.
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I2ec2e28320e14251f342b8749a1a738f136f3575
Reviewed-on: https://review.whamcloud.com/36267
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Wang Shilong <wshilong@ddn.com>