Whamcloud - gitweb
LU-7988 hsm: mark the cdt as stopped when its thread exits 62/22762/28
authorFrank Zago <fzago@cray.com>
Tue, 27 Sep 2016 19:13:29 +0000 (15:13 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 19 Jul 2017 03:27:54 +0000 (03:27 +0000)
commitf11a5022fc129fec797adb155e5553331f224ecc
treefc6b089fd805741ba23b517e180b71601dfa2468
parent7d29d3167684b13a612c8c1bff860019a218115c
LU-7988 hsm: mark the cdt as stopped when its thread exits

Use kthread_stop() to stop and join the coordinator thread. Only after
that step can the coordinator state be set to CDT_STOPPED. As a
coordinator doesn't stop instantly, this closes a race if the
coordinator is being restarted at the same time, leaving one thread
shutting down and a new one starting up.

Test-Parameters: trivial testlist=sanity-hsm
Signed-off-by: frank zago <fzago@cray.com>
Change-Id: I0a21d0d22403a56a8965441e1b57118073b6f210
Signed-off-by: Ben Evans <bevans@cray.com>
Reviewed-on: https://review.whamcloud.com/22762
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdt/mdt_coordinator.c
lustre/mdt/mdt_internal.h