summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-data.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-data.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index d4516c4ce..f58a03d84 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -705,6 +705,8 @@ afr_self_heal_find_sources (xlator_t *this, afr_local_t *local, dict_t **xattr,
afr_private_t *priv = NULL;
int i = 0;
+ int nsources = 0;
+
afr_self_heal_type sh_type = AFR_SELF_HEAL_DATA;
sh = &local->self_heal;
@@ -738,7 +740,11 @@ afr_self_heal_find_sources (xlator_t *this, afr_local_t *local, dict_t **xattr,
sh_type = AFR_SELF_HEAL_METADATA;
break;
}
- (void)afr_sh_mark_sources (sh, priv->child_count, sh_type);
+ nsources = afr_sh_mark_sources (sh, priv->child_count, sh_type);
+ if (nsources == 0) {
+ for (i = 0; i < priv->child_count; i++)
+ sh->sources[i] = 1;
+ }
}