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