summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-11-26 10:27:37 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-11-26 10:18:38 -0800
commit8d2594d77127ba7ea07a0d68afca0939e1817e39 (patch)
tree59096b5cff9ec144a4e306dc4598fd129674c21d
parent7d95955cd2b2b8979e66bcf09e792a34a12bd8a3 (diff)
cluster/afr: change data self-heal size check for arbiter
Size mismatch should consider that arbiter brick will have zero size file to prevent data self-heal to spuriously trigger/assuming need of self-heals. Change-Id: I179775d604236b9c8abfa360657abbb36abae829 BUG: 1285634 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/12755 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index 9726add5c82..2789754c2e8 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -467,6 +467,10 @@ afr_does_size_mismatch (xlator_t *this, unsigned char *sources,
if (!sources[i])
continue;
+ if (AFR_IS_ARBITER_BRICK (priv, i) &&
+ (replies[i].poststat.ia_size == 0))
+ continue;
+
if (!min)
min = &replies[i].poststat;