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
committerVijay Bellur <vijay@gluster.com>2012-05-22 04:28:56 -0700
commit64156e71bc71d7100b0e81bbe0702740b37c3ffb (patch)
tree7c88823c3890113eb4ebe18af4b5da60732ecfff /xlators/cluster/afr/src/afr-self-heal-data.c
parentf5c87c7bedfda7ed80d03918bfc3ce90069378e8 (diff)
cluster/afr: Handle files w.o. xattrs and size mismatch.
BUG: 765587 Change-Id: I1c1a739f25c4a798ba8ccaa52bc23d2c1dadd034 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3395 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.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 044d412d8..e38b78039 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;