summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-11-21 06:48:17 -0800
committerVijay Bellur <vbellur@redhat.com>2013-11-26 10:29:23 -0800
commitd1879d04e39258ea25a49eed3244b395d4af2c1d (patch)
tree5f919b61f9eb05a5bd5cd760b83603be1c0a4257 /xlators/cluster/afr/src
parentec8c678c4d8b948c1b471e497db5adc0221c154b (diff)
core: fix errno for non-existent GFID
When clients refer to a GFID which does not exist, the errno to be returned in ESTALE (and not ENOENT). Even though ENOENT might look "proper" most of the time, as the application eventually expects ENOENT even if a parent directory does not exist, not returning ESTALE results in resolvers (FUSE and GFAPI) to not retry resolution in uncached mode. This can result in spurious ENOENTs during concurrent path modification operations. Change-Id: I7a06ea6d6a191739f2e9c6e333a1969615e05936 BUG: 1032894 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6318 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@gmail.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src')
-rw-r--r--xlators/cluster/afr/src/afr-self-heald.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heald.c b/xlators/cluster/afr/src/afr-self-heald.c
index 1b48a1bca..8dbb9c69e 100644
--- a/xlators/cluster/afr/src/afr-self-heald.c
+++ b/xlators/cluster/afr/src/afr-self-heald.c
@@ -335,7 +335,7 @@ _get_path_from_gfid_loc (xlator_t *this, xlator_t *readdir_xl, loc_t *child,
ret = syncop_getxattr (readdir_xl, child, &xattr, GFID_TO_PATH_KEY);
if (ret < 0) {
- if ((errno == ENOENT) && missing)
+ if ((errno == ENOENT || errno == ESTALE) && missing)
*missing = _gf_true;
goto out;
}