|
|
12a457 |
From d3b7f70709eba7f5b0d755f48b3dab39401be778 Mon Sep 17 00:00:00 2001
|
|
|
12a457 |
From: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
12a457 |
Date: Thu, 12 May 2016 13:55:44 +0530
|
|
|
12a457 |
Subject: [PATCH 148/158] cluster/afr: Handle non-zero source in heal-info decision
|
|
|
12a457 |
|
|
|
12a457 |
Problem:
|
|
|
12a457 |
Spurious entries are reported in heal info when the mount is on second/third
|
|
|
12a457 |
brick of the replica pair because local-child is given preference in selecting
|
|
|
12a457 |
source. The code is supposed to suggest the file needs heal if the (source < 0)
|
|
|
12a457 |
(failure code path), but instead it is written as if any non-zero value
|
|
|
12a457 |
is considered failure.
|
|
|
12a457 |
|
|
|
12a457 |
Fix:
|
|
|
12a457 |
Treat +ve source as success case
|
|
|
12a457 |
|
|
|
12a457 |
>BUG: 1335429
|
|
|
12a457 |
>Change-Id: I1be7f9defef2ae03be7eec8d7d49bf34adeca82c
|
|
|
12a457 |
>Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
12a457 |
>Reviewed-on: http://review.gluster.org/14302
|
|
|
12a457 |
>Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
12a457 |
>Reviewed-by: Anuradha Talur <atalur@redhat.com>
|
|
|
12a457 |
>Smoke: Gluster Build System <jenkins@build.gluster.com>
|
|
|
12a457 |
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
|
|
|
12a457 |
>Reviewed-by: Ravishankar N <ravishankar@redhat.com>
|
|
|
12a457 |
>CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
|
|
|
12a457 |
|
|
|
12a457 |
BUG: 1335437
|
|
|
12a457 |
Change-Id: If50fb675b1018e16821a2ae5676725666204b60a
|
|
|
12a457 |
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
12a457 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/74271
|
|
|
12a457 |
Reviewed-by: Anuradha Talur <atalur@redhat.com>
|
|
|
12a457 |
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
12a457 |
Reviewed-by: Ravishankar Narayanankutty <ravishankar@redhat.com>
|
|
|
12a457 |
Tested-by: Ravishankar Narayanankutty <ravishankar@redhat.com>
|
|
|
12a457 |
---
|
|
|
12a457 |
xlators/cluster/afr/src/afr-common.c | 4 ++--
|
|
|
12a457 |
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
12a457 |
|
|
|
12a457 |
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
|
|
|
12a457 |
index 9ff3740..a346454 100644
|
|
|
12a457 |
--- a/xlators/cluster/afr/src/afr-common.c
|
|
|
12a457 |
+++ b/xlators/cluster/afr/src/afr-common.c
|
|
|
12a457 |
@@ -4568,11 +4568,11 @@ out:
|
|
|
12a457 |
}
|
|
|
12a457 |
|
|
|
12a457 |
gf_boolean_t
|
|
|
12a457 |
-afr_decide_heal_info (afr_private_t *priv, unsigned char *sources, int ret)
|
|
|
12a457 |
+afr_decide_heal_info (afr_private_t *priv, unsigned char *sources, int source)
|
|
|
12a457 |
{
|
|
|
12a457 |
int sources_count = 0;
|
|
|
12a457 |
|
|
|
12a457 |
- if (ret)
|
|
|
12a457 |
+ if (source < 0)
|
|
|
12a457 |
goto out;
|
|
|
12a457 |
|
|
|
12a457 |
sources_count = AFR_COUNT (sources, priv->child_count);
|
|
|
12a457 |
--
|
|
|
12a457 |
1.7.1
|
|
|
12a457 |
|