summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-data.c
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-03-13 11:15:36 +0530
committerAnand Avati <avati@redhat.com>2012-05-18 20:13:57 -0700
commitee5e73bb00cbec6a4ddd398d7461edcbe6d21f87 (patch)
tree378bfb23c3868e3e575605fc98cafc8fe323cae8 /xlators/cluster/afr/src/afr-self-heal-data.c
parent2a07f4fc090fe1f5cccff4d25e66cdc942ee5444 (diff)
cluster/afr: Handle files w.o. xattrs and size mismatch.
Change-Id: Ia27ee996bed8f5915c154718bf6e859b6a2fc335 BUG: 765587 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3090 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-data.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c10
1 files changed, 9 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 044d412d822..e38b780398a 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -821,9 +821,17 @@ afr_lookup_select_read_child_by_txn_type (xlator_t *this, afr_local_t *local,
nsources = afr_build_sources (this, xattr, bufs, pending_matrix,
sources, success_children, txn_type,
&subvol_status, _gf_false);
- if (subvol_status & SPLIT_BRAIN)
+ if (subvol_status & SPLIT_BRAIN) {
gf_log (this->name, GF_LOG_WARNING, "%s: Possible split-brain",
local->loc.path);
+ if (txn_type == AFR_DATA_TRANSACTION) {
+ //succeed lookup fail open
+ afr_set_split_brain (this, local->cont.lookup.inode,
+ _gf_true);
+ nsources = 1;
+ sources[success_children[0]] = 1;
+ }
+ }
if (nsources < 0)
goto out;