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