summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2017-07-06 19:49:47 +0530
committerRaghavendra Talur <rtalur@redhat.com>2017-07-19 21:32:48 +0000
commit9925b00d01fad2837359efc003cd7f00c4f8e56c (patch)
tree392bf8ad4befac266051bd2364da2f2022a92f9e /xlators/cluster
parent470889caeb67c8e5874f19867879104c9fc73a8f (diff)
afr: mark non sources as sinks in metadata heal
Problem: In a 3 way replica, when the source brick does not have pending xattrs for the sinks, but the 2 sinks blame each other, metadata heal was not happpening because we were not setting all non-sources as sinks. Fix: Mark all non-sources as sinks, like it is done in data and entry heal. > Reviewed-on: https://review.gluster.org/17717 > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> (cherry picked from commit 77c1ed5fd299914e91ff034d78ef6e3600b9151c) Change-Id: I534978940f5087302e307fcc810a48ffe898ce08 BUG: 1471612 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: https://review.gluster.org/17782 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c2
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-metadata.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index 444a1591f14..82c9ceb5c1f 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -563,7 +563,7 @@ __afr_selfheal_data_finalize_source (call_frame_t *frame, xlator_t *this,
healed_sinks, undid_pending,
AFR_DATA_TRANSACTION,
locked_on, replies);
- return source;
+ goto out;
}
/* No split brain at this point. If we were called from
diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c
index e7653030e45..f23cf8ec6ee 100644
--- a/xlators/cluster/afr/src/afr-self-heal-metadata.c
+++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c
@@ -231,7 +231,7 @@ __afr_selfheal_metadata_finalize_source (call_frame_t *frame, xlator_t *this,
undid_pending,
AFR_METADATA_TRANSACTION,
locked_on, replies);
- return source;
+ goto out;
}
/* If this is a directory mtime/ctime only split brain
@@ -245,7 +245,7 @@ __afr_selfheal_metadata_finalize_source (call_frame_t *frame, xlator_t *this,
uuid_utoa (replies[source].poststat.ia_gfid));
sources[source] = 1;
healed_sinks[source] = 0;
- return source;
+ goto out;
}
if (!priv->metadata_splitbrain_forced_heal) {
@@ -307,6 +307,8 @@ __afr_selfheal_metadata_finalize_source (call_frame_t *frame, xlator_t *this,
}
}
+out:
+ afr_mark_active_sinks (this, sources, locked_on, healed_sinks);
return source;
}