Whamcloud - gitweb
LU-7988 hsm: mark the cdt as stopped when its thread exits 19/28219/2
authorFrank Zago <fzago@cray.com>
Tue, 27 Sep 2016 19:13:29 +0000 (15:13 -0400)
committerJohn L. Hammond <john.hammond@intel.com>
Thu, 3 Aug 2017 21:40:43 +0000 (21:40 +0000)
commit58da5f41d5db9818ae1a1f148331eaad6fc63918
treeeb6dc2a35f2d285559295043083ac2ad21e713e2
parenta9d4e4b6a17bec691ce32460fdf9057ec080a738
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.

Lustre-change: https://review.whamcloud.com/22762
Lustre-commit: f11a5022fc129fec797adb155e5553331f224ecc

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-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28219
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/mdt/mdt_coordinator.c
lustre/mdt/mdt_internal.h