path: root/xlators/features/gfid-access
diff options
authorKotresh H R <>2014-02-25 16:20:46 +0530
committerAnand Avati <>2014-02-27 21:45:31 -0800
commit6535bafe588ea901ac15d31ddb6550a2ba9cd915 (patch)
tree512e660b0ee050bad7bfe80e3895bee3220c3b2c /xlators/features/gfid-access
parenta1bd3d295d9aa96011cff1d1f2915f26559118e7 (diff)
geo-rep/gfid-access: Fix errno for non-existent GFID.
Because of patch, ESTALE is returned for a lookukp on non-existent GFID. But ENOENT is more appropriate when lookup happens through virtual .gfid directory on aux-gfid-mount point. This is avoids confusion for the consumers of gfid-access-translator like geo-rep which expects ENOENT. Change-Id: I4add2edf5958bb59ce55d02726e6b3e801b101bb BUG: 1069191 Signed-off-by: Kotresh H R <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Raghavendra G <> Reviewed-by: Venky Shankar <> Reviewed-by: Anand Avati <>
Diffstat (limited to 'xlators/features/gfid-access')
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/features/gfid-access/src/gfid-access.c b/xlators/features/gfid-access/src/gfid-access.c
index 362fdab5a74..8e614397c13 100644
--- a/xlators/features/gfid-access/src/gfid-access.c
+++ b/xlators/features/gfid-access/src/gfid-access.c
@@ -666,6 +666,11 @@ ga_virtual_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
buf->ia_ino = temp_ino;
+ /* Lookup on non-existing gfid returns ESTALE.
+ Convert into ENOENT for virtual lookup*/
+ if (op_errno == ESTALE)
+ op_errno = ENOENT;
STACK_UNWIND_STRICT (lookup, frame, op_ret, op_errno, cbk_inode, buf,
xdata, postparent);