Whamcloud - gitweb
LU-12780 osp: use native kthreads for opd_pre_thread
rather than ptlrpc_thread, use native kthreads functionality.
- provide an opt_args structure which is allocated
and initialized before the thread is started so errors
cannot happen in the thread.
- include a completion to synchronize startup so we can be sure
the thread function actually runs, and so will clean up.
- use kthread_stop and kthread_should_stop to
synchronize shutdown.
The ptlrpc_thread was not used for signaling the thread about
work-to-do, so no change is needed there.
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ib0e2041da3fa4d613b17f743b18700c84a79fac2
Reviewed-on: https://review.whamcloud.com/36263
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>