From f325551e4c56f743cd1e2b9174d8b7dc9f861675 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 20 Mar 2013 11:39:01 +0530 Subject: nfs, afr: Fail lookup only on split-brain Change-Id: Icee9772f1f1bf5336eb82a4dc13e198424cd4a65 BUG: 921996 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/4699 Reviewed-by: Jeff Darcy Reviewed-by: Amar Tumballi Reviewed-by: Vijay Bellur Tested-by: Gluster Build System --- xlators/cluster/afr/src/afr-common.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators/cluster') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 537b9c206..4157174e4 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -1630,6 +1630,7 @@ afr_self_heal_lookup_unwind (call_frame_t *frame, xlator_t *this, afr_local_t *local = NULL; int ret = -1; dict_t *xattr = NULL; + int32_t spb = 0; local = frame->local; @@ -1661,6 +1662,9 @@ afr_self_heal_lookup_unwind (call_frame_t *frame, xlator_t *this, local->self_heal.actual_sh_started); } + if (local->loc.inode) + spb = afr_is_split_brain (this, local->loc.inode); + ret = dict_set_int32 (xattr, "split-brain", spb); } out: AFR_STACK_UNWIND (lookup, frame, local->op_ret, local->op_errno, -- cgit