geo-rep/gfid-access: Fix errno for non-existent GFID.

Because of http://review.gluster.org/#/c/6318/ 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 <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/7154
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
This commit is contained in:
Kotresh H R 2014-02-25 16:20:46 +05:30 committed by Anand Avati
parent a1bd3d295d
commit 6535bafe58

View File

@ -666,6 +666,11 @@ ga_virtual_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
buf->ia_ino = temp_ino;
unwind:
/* 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);