Whamcloud - gitweb
LU-12780 quota: don't use ptlrpc_thread for qsd_reint_main()
Instead of ptlrpc_thread, use native kthread operations.
- perform allocation before starting the thread, and don't
bother with synchronization at thread start
- use kthread_stop() and kthread_should_stop() to signal
shutdown
- as the thread can stop independently, use xchg() on
qqi->qqi_reint_task to determine if there is a waiter, and
if so, the thread should synchronize with the waiter.
- use wake_up_var and wait_var_event for event signalling.
Also use kthread's thread-name formatting rather than
allocating a 'name' for formating the name separately.
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ia1334a3e865b67ba5ae78c7b8342704a340229f7
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/36268
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>