cb8e9e
From 80da8d75218552f2f78c37369a295be151cdc1f8 Mon Sep 17 00:00:00 2001
cb8e9e
From: Saravanakumar Arumugam <sarumuga@redhat.com>
cb8e9e
Date: Thu, 28 May 2015 11:54:04 +0530
cb8e9e
Subject: [PATCH 60/73] geo-rep: ignore symlink and harlink errors in geo-rep
cb8e9e
cb8e9e
Ignore logging in case of symlink and hardlink creation
cb8e9e
errors, as these are safe errors with respect to
cb8e9e
geo-replication.
cb8e9e
cb8e9e
Change-Id: I3b863fb03ae23dbea907e4dd9477ff85feecad70
cb8e9e
BUG: 1224662
cb8e9e
Reviewed-On: http://review.gluster.org/10957
cb8e9e
Reviewed-On: http://review.gluster.org/10984
cb8e9e
Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
cb8e9e
Reviewed-on: https://code.engineering.redhat.com/gerrit/50523
cb8e9e
Reviewed-by: Aravinda Vishwanathapura Krishna Murthy <avishwan@redhat.com>
cb8e9e
Tested-by: Aravinda Vishwanathapura Krishna Murthy <avishwan@redhat.com>
cb8e9e
---
cb8e9e
 xlators/protocol/client/src/client-rpc-fops.c |   26 ++++++++++++++----------
cb8e9e
 1 files changed, 15 insertions(+), 11 deletions(-)
cb8e9e
cb8e9e
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
cb8e9e
index e5912bd..e8e3cdf 100644
cb8e9e
--- a/xlators/protocol/client/src/client-rpc-fops.c
cb8e9e
+++ b/xlators/protocol/client/src/client-rpc-fops.c
cb8e9e
@@ -163,13 +163,15 @@ client3_3_symlink_cbk (struct rpc_req *req, struct iovec *iov, int count,
cb8e9e
 
cb8e9e
 out:
cb8e9e
         if (rsp.op_ret == -1) {
cb8e9e
-                /* no need to print the gfid, because it will be null, since
cb8e9e
-                 * symlink operation failed.
cb8e9e
-                 */
cb8e9e
-                gf_log (this->name, GF_LOG_WARNING,
cb8e9e
-                        "remote operation failed: %s. Path: (%s to %s)",
cb8e9e
-                        strerror (gf_error_to_errno (rsp.op_errno)),
cb8e9e
-                        local->loc.path, local->loc2.path);
cb8e9e
+                if (GF_IGNORE_IF_GSYNCD_SAFE_ERROR(frame, rsp.op_errno)) {
cb8e9e
+                        /* no need to print the gfid, because it will be null,
cb8e9e
+                         * since symlink operation failed.
cb8e9e
+                         */
cb8e9e
+                        gf_log (this->name, GF_LOG_WARNING,
cb8e9e
+                                "remote operation failed: %s. Path: (%s to %s)",
cb8e9e
+                                strerror (gf_error_to_errno (rsp.op_errno)),
cb8e9e
+                                local->loc.path, local->loc2.path);
cb8e9e
+                }
cb8e9e
         }
cb8e9e
 
cb8e9e
         CLIENT_STACK_UNWIND (symlink, frame, rsp.op_ret,
cb8e9e
@@ -2668,10 +2670,12 @@ client3_3_link_cbk (struct rpc_req *req, struct iovec *iov, int count,
cb8e9e
 
cb8e9e
 out:
cb8e9e
         if (rsp.op_ret == -1) {
cb8e9e
-                gf_log (this->name, GF_LOG_WARNING,
cb8e9e
-                        "remote operation failed: %s (%s -> %s)",
cb8e9e
-                        strerror (gf_error_to_errno (rsp.op_errno)),
cb8e9e
-                        local->loc.path, local->loc2.path);
cb8e9e
+                if (GF_IGNORE_IF_GSYNCD_SAFE_ERROR(frame, rsp.op_errno)) {
cb8e9e
+                        gf_log (this->name, GF_LOG_WARNING,
cb8e9e
+                                "remote operation failed: %s (%s -> %s)",
cb8e9e
+                                strerror (gf_error_to_errno (rsp.op_errno)),
cb8e9e
+                                local->loc.path, local->loc2.path);
cb8e9e
+                }
cb8e9e
         }
cb8e9e
 
cb8e9e
         CLIENT_STACK_UNWIND (link, frame, rsp.op_ret,
cb8e9e
-- 
cb8e9e
1.7.1
cb8e9e