summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Hernandez <jahernan@redhat.com>2018-02-01 16:06:32 +0100
committerXavier Hernandez <jahernan@redhat.com>2018-02-05 10:15:06 +0100
commitdc63fde911aaed130e7de2c883f7cdc327c0c829 (patch)
tree13f53752b5f2d078bd52b7f74dc329c6c0a158aa
parentd1e091cb9dd4e69323138641c41bda28e333f50a (diff)
cluster/afr: remove unnecessary child_up initialization
The child_up array was initialized with all elements being -1 to allow afr_notify() to differentiate down bricks from bricks that haven't reported yet. With current implementation this is not needed anymore and it was causing unexpected results when other parts of the code considered that if child_up[i] != 0, it meant that it was up. Backport of: > BUG: 1541038 Change-Id: I2a9d712ee64c512f24bd5cd3a48dcb37e3139472 BUG: 1541929 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
-rw-r--r--xlators/cluster/afr/src/afr.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index 43389390730..3bfc25bf13c 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -582,13 +582,6 @@ init (xlator_t *this)
goto out;
}
- for (i = 0; i < child_count; i++)
- priv->child_up[i] = -1; /* start with unknown state.
- this initialization needed
- for afr_notify() to work
- reliably
- */
-
priv->children = GF_CALLOC (sizeof (xlator_t *), child_count,
gf_afr_mt_xlator_t);
if (!priv->children) {