Whamcloud - gitweb
LU-9664 hsm: protect cdt_state
In hsm_cancel_all_actions in mdt_coordinator.c, the cdt_state
could be set to wrong state if there are more than one
hsm_cancel_all_actions at the same time.
Assume the state is CDT_ENABLED before hsm_cancel_all_actions
the first call the second call
CDT_ENABLED is saved
cdt_state = CDT_DISABLED
CDT_DISABLED is saved
... cdt_state remains CDT_DISABLED
cdt_state = CDT_ENABLED ...
cdt_state = CDT_DISABLED
This patch introduces cdt_state_lock to protect the state.
Test-Parameters: trivial testlist=sanity-hsm
Change-Id: I7c976a3a506300de7cf9f5fa1d53741b2e28b654
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: https://review.whamcloud.com/27634
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: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>