From d1879d04e39258ea25a49eed3244b395d4af2c1d Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Thu, 21 Nov 2013 06:48:17 -0800 Subject: 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 Reviewed-on: http://review.gluster.org/6318 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Brian Foster Reviewed-by: Vijay Bellur --- xlators/protocol/client/src/client-rpc-fops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/protocol/client/src') diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c index 6901d8e2c..01590d73a 100644 --- a/xlators/protocol/client/src/client-rpc-fops.c +++ b/xlators/protocol/client/src/client-rpc-fops.c @@ -2763,7 +2763,8 @@ out: rsp.op_errno = op_errno; if (rsp.op_ret == -1) { /* any error other than ENOENT */ - if (rsp.op_errno != ENOENT) + if (!(local->loc.name && rsp.op_errno == ENOENT) && + !(rsp.op_errno == ESTALE)) gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s. Path: %s (%s)", strerror (rsp.op_errno), local->loc.path, -- cgit