From dccd014947131fabfb14ab96ced05cbc685f7076 Mon Sep 17 00:00:00 2001 From: Venkatesh Somyajulu Date: Tue, 11 Jun 2013 13:15:23 +0530 Subject: cluster/afr: Improvement in logging of self heal completion status Problem: As the end of the self heal, message logged by "afr_self_heal_completion_cbk" is inadequate to determine what exactly failed during the course of afr self heal. It is worth to have knowledge of what all types of self heal got triggered for an entity and whether the status is success or failure. Fix: At the end of self heal, it will log information about out of 4 types of self heal (gfid or missing entry self heal, metadata, data and entry self heal), who all got triggered and who all got failed or successful at the end. Change-Id: I5360762fbd7d391ac4c6af6706b4835c5801835a BUG: 968301 Signed-off-by: Venkatesh Somyajulu Reviewed-on: http://review.gluster.org/5106 Reviewed-by: Pranith Kumar Karampuri Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/cluster/afr/src/afr-self-heal-common.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'xlators/cluster/afr/src/afr-self-heal-common.h') diff --git a/xlators/cluster/afr/src/afr-self-heal-common.h b/xlators/cluster/afr/src/afr-self-heal-common.h index 035fce543a5..329bb2f1ed0 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.h +++ b/xlators/cluster/afr/src/afr-self-heal-common.h @@ -133,4 +133,26 @@ int afr_sh_erase_pending (call_frame_t *frame, xlator_t *this, afr_transaction_type type, afr_fxattrop_cbk_t cbk, int (*finish)(call_frame_t *frame, xlator_t *this)); + +void +afr_set_local_for_unhealable (afr_local_t *local); + +int +is_self_heal_failed (afr_self_heal_t *sh); + +void +afr_set_data_sh_status (afr_self_heal_t *sh, afr_self_heal_status status); + +void +afr_set_metadata_sh_status (afr_self_heal_t *sh, afr_self_heal_status staus); + +void +afr_set_entry_sh_status (afr_self_heal_t *sh, afr_self_heal_status status); + +void +afr_set_gfid_or_missing_entry_sh_status (afr_self_heal_t *sh, + afr_self_heal_status status); + +void +afr_log_self_heal_completion_status (afr_local_t *local, gf_loglevel_t logl); #endif /* __AFR_SELF_HEAL_COMMON_H__ */ -- cgit