From 07df9b56fd0eb4abf1ef6a45318519c9d7ae08e3 Mon Sep 17 00:00:00 2001 From: Saravanakumar Arumugam Date: Thu, 28 May 2015 11:54:04 +0530 Subject: geo-rep: ignore symlink and harlink errors in geo-rep Ignore logging in case of symlink and hardlink creation errors, as these are safe errors with respect to geo-replication. Change-Id: I3b863fb03ae23dbea907e4dd9477ff85feecad70 BUG: 1225571 Signed-off-by: Saravanakumar Arumugam Reviewed-on: http://review.gluster.org/10957 Tested-by: NetBSD Build System Reviewed-by: Aravinda VK Reviewed-by: Vijay Bellur --- xlators/protocol/client/src/client-rpc-fops.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (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 b15c863dee1..54699ba94ac 100644 --- a/xlators/protocol/client/src/client-rpc-fops.c +++ b/xlators/protocol/client/src/client-rpc-fops.c @@ -158,13 +158,15 @@ client3_3_symlink_cbk (struct rpc_req *req, struct iovec *iov, int count, out: if (rsp.op_ret == -1) { - /* no need to print the gfid, because it will be null, since - * symlink operation failed. - */ - gf_log (this->name, GF_LOG_WARNING, - "remote operation failed: %s. Path: (%s to %s)", - strerror (gf_error_to_errno (rsp.op_errno)), - local->loc.path, local->loc2.path); + if (GF_IGNORE_IF_GSYNCD_SAFE_ERROR(frame, rsp.op_errno)) { + /* no need to print the gfid, because it will be null, + * since symlink operation failed. + */ + gf_log (this->name, GF_LOG_WARNING, + "remote operation failed: %s. Path: (%s to %s)", + strerror (gf_error_to_errno (rsp.op_errno)), + local->loc.path, local->loc2.path); + } } CLIENT_STACK_UNWIND (symlink, frame, rsp.op_ret, @@ -2663,10 +2665,12 @@ client3_3_link_cbk (struct rpc_req *req, struct iovec *iov, int count, out: if (rsp.op_ret == -1) { - gf_log (this->name, GF_LOG_WARNING, - "remote operation failed: %s (%s -> %s)", - strerror (gf_error_to_errno (rsp.op_errno)), - local->loc.path, local->loc2.path); + if (GF_IGNORE_IF_GSYNCD_SAFE_ERROR(frame, rsp.op_errno)) { + gf_log (this->name, GF_LOG_WARNING, + "remote operation failed: %s (%s -> %s)", + strerror (gf_error_to_errno (rsp.op_errno)), + local->loc.path, local->loc2.path); + } } CLIENT_STACK_UNWIND (link, frame, rsp.op_ret, -- cgit