From 61f68b31f24311d09f4d2a02968ff52fd7b5a73f Mon Sep 17 00:00:00 2001 From: Pranith K Date: Thu, 14 Jul 2011 06:31:33 +0000 Subject: storage/posix: Succeed lookup even if there is no gfid on the file Signed-off-by: Pranith Kumar K Signed-off-by: Anand Avati BUG: 2745 (failure to detect split brain) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2745 --- xlators/storage/posix/src/posix-helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/storage/posix/src/posix-helpers.c') diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index 5aa09d977..43a5a7053 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -188,7 +188,7 @@ posix_fill_gfid_path (xlator_t *this, const char *path, struct iatt *iatt) ret = sys_lgetxattr (path, GFID_XATTR_KEY, iatt->ia_gfid, 16); /* Return value of getxattr */ - if (ret == 16) + if ((ret == 16) || (ret == -1)) ret = 0; return ret; @@ -205,7 +205,7 @@ posix_fill_gfid_fd (xlator_t *this, int fd, struct iatt *iatt) ret = sys_fgetxattr (fd, GFID_XATTR_KEY, iatt->ia_gfid, 16); /* Return value of getxattr */ - if (ret == 16) + if ((ret == 16) || (ret == -1)) ret = 0; return ret; -- cgit