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