a3470f
From d4f44782105268a9f1780f8ed53a98a28ba09053 Mon Sep 17 00:00:00 2001
a3470f
From: Xavier Hernandez <jahernan@redhat.com>
a3470f
Date: Thu, 1 Feb 2018 16:06:32 +0100
a3470f
Subject: [PATCH 157/180] cluster/afr: remove unnecessary child_up
a3470f
 initialization
a3470f
a3470f
The child_up array was initialized with all elements being -1 to
a3470f
allow afr_notify() to differentiate down bricks from bricks that
a3470f
haven't reported yet. With current implementation this is not needed
a3470f
anymore and it was causing unexpected results when other parts of
a3470f
the code considered that if child_up[i] != 0, it meant that it was up.
a3470f
a3470f
> Upstream patch: https://review.gluster.org/19440
a3470f
a3470f
Change-Id: I2a9d712ee64c512f24bd5cd3a48dcb37e3139472
a3470f
BUG: 1541932
a3470f
Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
a3470f
Reviewed-on: https://code.engineering.redhat.com/gerrit/130431
a3470f
Tested-by: RHGS Build Bot <nigelb@redhat.com>
a3470f
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
a3470f
---
a3470f
 xlators/cluster/afr/src/afr.c | 7 -------
a3470f
 1 file changed, 7 deletions(-)
a3470f
a3470f
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
a3470f
index 84dbcc0..d3aee77 100644
a3470f
--- a/xlators/cluster/afr/src/afr.c
a3470f
+++ b/xlators/cluster/afr/src/afr.c
a3470f
@@ -583,13 +583,6 @@ init (xlator_t *this)
a3470f
                 goto out;
a3470f
         }
a3470f
 
a3470f
-        for (i = 0; i < child_count; i++)
a3470f
-                priv->child_up[i] = -1; /* start with unknown state.
a3470f
-                                           this initialization needed
a3470f
-                                           for afr_notify() to work
a3470f
-                                           reliably
a3470f
-                                        */
a3470f
-
a3470f
         priv->children = GF_CALLOC (sizeof (xlator_t *), child_count,
a3470f
                                     gf_afr_mt_xlator_t);
a3470f
         if (!priv->children) {
a3470f
-- 
a3470f
1.8.3.1
a3470f