Whamcloud - gitweb
LU-7988 hsm: change coordinator start/stop mechanisms 67/22667/24
authorFrank Zago <fzago@cray.com>
Wed, 21 Sep 2016 19:17:19 +0000 (15:17 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 17 May 2017 18:07:43 +0000 (18:07 +0000)
commit958198e3938120040e93fc2aa255151fa6a81907
tree09696c637672bbd102b45d4873be876bda4c1458
parent32d1a1c5d610d054ad4609c1cf332172e8310805
LU-7988 hsm: change coordinator start/stop mechanisms

Instead of using cdt_state and cdt_thread.t_flags to keep the state of
the coordinator, only use cdt_state. cdt_thread.t_flags is now only
used to signal the coordinator, not to stop it. cdt_state is used to
control the coordinator behaviour.

Split mdt_hsm_cdt_stop() into 2 functions. One to actually signal the
coordinator to stop, and another one to cleanup its ressources. The
coordinator is now responsible to clean its own ressources instead of
having two different paths depending on whether Lustre is shutting
down, or a user is stopping it through /proc.

Protect cdt_state with a spin lock, and add a transition table to
catch invalid transitions.

Removed mdt_opts.mo_coordinator as it is just a subset of cdt_state.

Test-Parameters: trivial testlist=sanity-hsm
Signed-off-by: frank zago <fzago@cray.com>
Signed-off-by: Quentin Bouget <quentin.bouget@cea.fr>
Change-Id: I7b0a878792d287b781578a7afe4e2c2cf7dec5cc
Reviewed-on: https://review.whamcloud.com/22667
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Jean-Baptiste Riaux <riaux.jb@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdt/mdt_coordinator.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h