summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-common.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2014-09-13 12:08:56 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2014-09-24 01:51:35 -0700
commit70d76f20ee127fe7e8e52b2d67e2362283a01f34 (patch)
treea0bd58a4f86dbe26763dc6b008818eac7e190e40 /xlators/cluster/afr/src/afr-common.c
parentbd592f8b8379087604f35c3b377f6e94b9e1697d (diff)
cluster/afr: Fix spurious metadata self-heals
- Added logging for metadata and data self-heals which helped in debugging this issue. - Added checks to skip self-heals when no sinks are available to heal Change-Id: I0d50dceb84cd9ad4fe00e0b749ddf7d4ff42348a BUG: 1128721 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8709 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-common.c')
-rw-r--r--xlators/cluster/afr/src/afr-common.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index d1bce6284a8..3e745e2491e 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -1198,8 +1198,8 @@ xattr_is_equal (dict_t *this, char *key1, data_t *value1, void *data)
* We need to do both because ignoring glusterfs' internal xattrs
* happens only in xattr_is_equal().
*/
-static gf_boolean_t
-dicts_are_equal (dict_t *dict1, dict_t *dict2)
+gf_boolean_t
+afr_xattrs_are_equal (dict_t *dict1, dict_t *dict2)
{
int ret = 0;
@@ -1596,7 +1596,8 @@ afr_can_start_metadata_self_heal(call_frame_t *frame, xlator_t *this)
}
/*Check if xattrs need heal*/
- if (!dicts_are_equal (replies[first].xdata, replies[i].xdata))
+ if (!afr_xattrs_are_equal (replies[first].xdata,
+ replies[i].xdata))
start = _gf_true;
}