diff options
author | Venkatesh Somyajula <vsomyaju@redhat.com> | 2012-11-23 18:12:52 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-11-26 01:04:52 -0800 |
commit | 2b1bf891f550487d2c05fc9e377f0d15d4a08d0a (patch) | |
tree | f685c864b0f3519227376ffa77539fcd944daf6b /xlators/cluster/afr/src/afr-common.c | |
parent | b6bf52bdcc78c7a803430ebcd7be367fbbf9cc4d (diff) |
Cluster/afr: Fix output for gluster volume heal vn info healed
Problem:
Whenever gluster volume heal vol full command is executed, the entries
stored in the circual buffer for sh->healed are added in the dictionary
in the _crawl_post_sh_action function irrespective of whether actual self heal
(due to non-zero values in chage log) takes place or not.
Fix:
Value of key (actual-sh-done) will be set to 1 whenever self heal takes place
due to non-zero change log values and if for some FOP self heal daemon finds
that no self heal required after examining the pending matrix, the value will
be 0.
Change-Id: I11fd0b9ee76759af17c5bca6bfafbaf66bcaacbc
BUG: 863068
Signed-off-by: Venkatesh Somyajula <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/4181
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-common.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 21272c0d7..693c3a070 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -1624,6 +1624,17 @@ afr_self_heal_lookup_unwind (call_frame_t *frame, xlator_t *this, if (ret) gf_log (this->name, GF_LOG_ERROR, "%s: Failed to set " "sh-failed to %d", local->loc.path, sh_failed); + + if (local->self_heal.actual_sh_started == _gf_true && + sh_failed == 0) { + ret = dict_set_int32 (xattr, "actual-sh-done", 1); + if (ret) + gf_log(this->name, GF_LOG_ERROR, "%s: Failed to" + " set actual-sh-done to %d", + local->loc.path, + local->self_heal.actual_sh_started); + } + } out: AFR_STACK_UNWIND (lookup, frame, local->op_ret, local->op_errno, |