From ce0e4c3d6eb710f29cb02166fdfa9e6afb013df6 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Fri, 16 Jul 2010 08:37:29 +0000 Subject: return ENOENT instead of ESTALE for links in client for stripe Instead of returning a ESTALE for links and symlink return a ENOENT, as they only exist on the FIRSTCHILD, and any lookup fails in the other bricks. Signed-off-by: shishir gowda Signed-off-by: Anand V. Avati BUG: 1152 (ln on symlink returns NFS STALE error even on success) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1152 --- xlators/protocol/client/src/client3_1-fops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index 4c222adbce4..3734c90955f 100644 --- a/xlators/protocol/client/src/client3_1-fops.c +++ b/xlators/protocol/client/src/client3_1-fops.c @@ -1949,6 +1949,7 @@ client3_1_lookup_cbk (struct rpc_req *req, struct iovec *iov, int count, } out: + rsp.op_errno = op_errno; frame->local = NULL; STACK_UNWIND_STRICT (lookup, frame, rsp.op_ret, rsp.op_errno, inode, &stbuf, xattr, &postparent); @@ -2961,6 +2962,7 @@ client3_1_link (call_frame_t *frame, xlator_t *this, "RENAME %"PRId64"/%s (%s): failed to get remote inode " "number for source parent", args->oldloc->parent->ino, args->oldloc->name, args->oldloc->path); + op_errno = ENOENT; goto unwind; } @@ -4558,6 +4560,7 @@ client3_1_setattr (call_frame_t *frame, xlator_t *this, "STAT %"PRId64" (%s): " "failed to get remote inode number", args->loc->inode->ino, args->loc->path); + op_errno = ENOENT; goto unwind; } req.path = (char *)args->loc->path; -- cgit