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/nfs/server/src/nfs-fops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/nfs') diff --git a/xlators/nfs/server/src/nfs-fops.c b/xlators/nfs/server/src/nfs-fops.c index df09d22bb..f85f6b2c4 100644 --- a/xlators/nfs/server/src/nfs-fops.c +++ b/xlators/nfs/server/src/nfs-fops.c @@ -385,15 +385,15 @@ nfs_fop_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, { struct nfs_fop_local *local = NULL; fop_lookup_cbk_t progcbk; - char *sh_fail_val = NULL; + int32_t spb = 0; /* * With native protocol, self-heal failures would be detected during * open. NFS doesn't issue that open when revalidating cache, so we * have to check for failures here instead. */ - if (dict_get_str(xattr,"sh-failed",&sh_fail_val) == 0) { - if (strcmp(sh_fail_val,"1") == 0) { + if (dict_get_int32(xattr, "split-brain", &spb) == 0) { + if (spb) { op_ret = -1; op_errno = EIO; } -- cgit