summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-common.c
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-04-06 05:21:29 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-06 22:04:48 +0530
commit258fec70ba2cc588f500f3e3bc16c99af212b4c9 (patch)
treea87c7c365383674f7b20a40c74fec5a25be3b9df /xlators/cluster/afr/src/afr-self-heal-common.c
parent6b18487d2811b4fb004d0f4c5c98a101a93b35ed (diff)
Fix in return value of afr_sh_mark_sources
afr_sh_mark_sources now returns: -1 if two wise subvols conflict (split-brain) 0 if all subvols are innocent (no self-heal needed) >0 if sources found Also, changes to callers of afr_sh_mark_sources to handle return value properly. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-common.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index 04530ccb0a0..518907ac78a 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -446,6 +446,8 @@ afr_sh_mark_sources (int32_t *pending_matrix[], int sources[], int child_count)
if (afr_sh_wise_nodes_conflict (characters, child_count)) {
/* split-brain */
+
+ nsources = -1;
goto out;
} else {