From 5ce988633d51ff10f24c03a0e4d3c7c101e43af5 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 13 Mar 2012 11:15:36 +0530 Subject: cluster/afr: Handle files w.o. xattrs and size mismatch. Change-Id: I31458538c738c85a026994584c937c99538fe069 BUG: 802637 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/2932 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/cluster/afr/src/afr-self-heal-data.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/afr/src/afr-self-heal-data.c') diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c index 7d2c86eedae..7e97cf8cb42 100644 --- a/xlators/cluster/afr/src/afr-self-heal-data.c +++ b/xlators/cluster/afr/src/afr-self-heal-data.c @@ -812,9 +812,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) { ret = -1; goto out; -- cgit