diff options
author | Anand Avati <avati@redhat.com> | 2013-11-21 06:48:17 -0800 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-11-26 10:29:23 -0800 |
commit | d1879d04e39258ea25a49eed3244b395d4af2c1d (patch) | |
tree | 5f919b61f9eb05a5bd5cd760b83603be1c0a4257 /xlators/cluster/dht/src/dht-common.h | |
parent | ec8c678c4d8b948c1b471e497db5adc0221c154b (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/dht/src/dht-common.h')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index 81e4cc17556..0497352e9a8 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -351,6 +351,8 @@ typedef enum { } \ } while (0) +#define dht_inode_missing(op_errno) (op_errno == ENOENT || op_errno == ESTALE) + #define check_is_dir(i,s,x) (IA_ISDIR(s->ia_type)) #define layout_is_sane(layout) ((layout) && (layout->cnt > 0)) |