7f4c2a
From d65ecec648d5681044c01279f62c11925e752c87 Mon Sep 17 00:00:00 2001
7f4c2a
From: Manikandan Selvaganesh <mselvaga@redhat.com>
7f4c2a
Date: Wed, 17 Jun 2015 18:42:06 +0530
7f4c2a
Subject: [PATCH 141/190] protocol/client : removing duplicate printing in gf_msg
7f4c2a
7f4c2a
Since the 3rd and 5th argument of gf_msg framework
7f4c2a
prints the error string in case of strerror(),
7f4c2a
5th argument is removed.
7f4c2a
7f4c2a
Change-Id: Ib1794ea2d4cb5c46a39311f0afcfd7e494540506
7f4c2a
BUG: 1231775
7f4c2a
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
7f4c2a
Reviewed-on: https://code.engineering.redhat.com/gerrit/51100
7f4c2a
Reviewed-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
7f4c2a
Tested-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
7f4c2a
---
7f4c2a
 xlators/protocol/client/src/client-handshake.c |   23 +-
7f4c2a
 xlators/protocol/client/src/client-rpc-fops.c  |  258 ++++++++++++------------
7f4c2a
 2 files changed, 139 insertions(+), 142 deletions(-)
7f4c2a
7f4c2a
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
7f4c2a
index 457fa25..d45bf95 100644
7f4c2a
--- a/xlators/protocol/client/src/client-handshake.c
7f4c2a
+++ b/xlators/protocol/client/src/client-handshake.c
7f4c2a
@@ -719,9 +719,9 @@ client3_3_reopen_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
         }
7f4c2a
 
7f4c2a
         if (rsp.op_ret < 0) {
7f4c2a
-                gf_msg (frame->this->name, GF_LOG_WARNING, 0,
7f4c2a
-                        PC_MSG_DIR_OP_SUCCESS, "reopen on %s failed (%s)",
7f4c2a
-                        local->loc.path, strerror (rsp.op_errno));
7f4c2a
+                gf_msg (frame->this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                        PC_MSG_DIR_OP_SUCCESS, "reopen on %s failed.",
7f4c2a
+                        local->loc.path);
7f4c2a
         } else {
7f4c2a
                 gf_msg_debug (frame->this->name, 0,
7f4c2a
                               "reopen on %s succeeded (remote-fd = %"PRId64")",
7f4c2a
@@ -811,9 +811,9 @@ client3_3_reopendir_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
         }
7f4c2a
 
7f4c2a
         if (rsp.op_ret < 0) {
7f4c2a
-                gf_msg (frame->this->name, GF_LOG_WARNING, 0,
7f4c2a
-                        PC_MSG_DIR_OP_FAILED, "reopendir on %s failed (%s)",
7f4c2a
-                        local->loc.path, strerror (rsp.op_errno));
7f4c2a
+                gf_msg (frame->this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                        PC_MSG_DIR_OP_FAILED, "reopendir on %s failed",
7f4c2a
+                        local->loc.path);
7f4c2a
         } else {
7f4c2a
                 gf_msg (frame->this->name, GF_LOG_INFO, 0,
7f4c2a
                         PC_MSG_DIR_OP_SUCCESS, "reopendir on %s succeeded "
7f4c2a
@@ -1110,9 +1110,8 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m
7f4c2a
         op_ret   = rsp.op_ret;
7f4c2a
         op_errno = gf_error_to_errno (rsp.op_errno);
7f4c2a
         if (-1 == rsp.op_ret) {
7f4c2a
-                gf_msg (frame->this->name, GF_LOG_WARNING, 0,
7f4c2a
-                        PC_MSG_VOL_SET_FAIL, "failed to set the volume (%s)",
7f4c2a
-                        (op_errno)? strerror (op_errno) : "--");
7f4c2a
+                gf_msg (frame->this->name, GF_LOG_WARNING, op_errno,
7f4c2a
+                        PC_MSG_VOL_SET_FAIL, "failed to set the volume");
7f4c2a
         }
7f4c2a
 
7f4c2a
         reply = dict_new ();
7f4c2a
@@ -1145,9 +1144,9 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m
7f4c2a
         }
7f4c2a
 
7f4c2a
         if (op_ret < 0) {
7f4c2a
-                gf_msg (this->name, GF_LOG_ERROR, 0, PC_MSG_SETVOLUME_FAIL,
7f4c2a
-                        "SETVOLUME on remote-host failed: %s",
7f4c2a
-                        remote_error ? remote_error : strerror (op_errno));
7f4c2a
+                gf_msg (this->name, GF_LOG_ERROR, op_errno,
7f4c2a
+                        PC_MSG_SETVOLUME_FAIL,
7f4c2a
+                        "SETVOLUME on remote-host failed");
7f4c2a
                 errno = op_errno;
7f4c2a
                 if (remote_error &&
7f4c2a
                     (strcmp ("Authentication failed", remote_error) == 0)) {
7f4c2a
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
7f4c2a
index 223a60d..9512087 100644
7f4c2a
--- a/xlators/protocol/client/src/client-rpc-fops.c
7f4c2a
+++ b/xlators/protocol/client/src/client-rpc-fops.c
7f4c2a
@@ -171,10 +171,10 @@ out:
7f4c2a
                         /* no need to print the gfid, because it will be null,
7f4c2a
                          * since symlink operation failed.
7f4c2a
                          */
7f4c2a
-                        gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                        gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                                gf_error_to_errno (rsp.op_errno),
7f4c2a
                                 PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                                "remote operation failed: %s. Path: (%s to %s)",
7f4c2a
-                                strerror (gf_error_to_errno (rsp.op_errno)),
7f4c2a
+                                "remote operation failed. Path: (%s to %s)",
7f4c2a
                                 local->loc.path, local->loc2.path);
7f4c2a
                 }
7f4c2a
         }
7f4c2a
@@ -245,9 +245,9 @@ out:
7f4c2a
             GF_IGNORE_IF_GSYNCD_SAFE_ERROR(frame, rsp.op_errno)) {
7f4c2a
                 gf_msg (this->name, fop_log_level (GF_FOP_MKNOD,
7f4c2a
                         gf_error_to_errno (rsp.op_errno)),
7f4c2a
-                        rsp.op_errno, PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s. Path: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)),
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
+                        PC_MSG_REMOTE_OP_FAILED,
7f4c2a
+                        "remote operation failed. Path: %s",
7f4c2a
                         local->loc.path);
7f4c2a
         }
7f4c2a
 
7f4c2a
@@ -314,10 +314,10 @@ out:
7f4c2a
         if (rsp.op_ret == -1 &&
7f4c2a
             GF_IGNORE_IF_GSYNCD_SAFE_ERROR(frame, rsp.op_errno)) {
7f4c2a
                 gf_msg (this->name, fop_log_level (GF_FOP_MKDIR,
7f4c2a
-                        gf_error_to_errno (rsp.op_errno)), rsp.op_errno,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno)),
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s. Path: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)),
7f4c2a
+                        "remote operation failed. Path: %s",
7f4c2a
                         local->loc.path);
7f4c2a
         }
7f4c2a
 
7f4c2a
@@ -460,9 +460,9 @@ out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
                 gf_msg (this->name, fop_log_level (GF_FOP_OPEN,
7f4c2a
                         gf_error_to_errno (rsp.op_errno)),
7f4c2a
-                        rsp.op_errno, PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s. Path: %s (%s)",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)),
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
+                        PC_MSG_REMOTE_OP_FAILED,
7f4c2a
+                        "remote operation failed. Path: %s (%s)",
7f4c2a
                         local->loc.path, loc_gfid_utoa (&local->loc));
7f4c2a
         }
7f4c2a
 
7f4c2a
@@ -525,10 +525,10 @@ out:
7f4c2a
                                       strerror (gf_error_to_errno
7f4c2a
                                                 (rsp.op_errno)));
7f4c2a
                 } else {
7f4c2a
-                        gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                        gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                                gf_error_to_errno (rsp.op_errno),
7f4c2a
                                 PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                                "remote operation failed: %s",
7f4c2a
-                                strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                                "remote operation failed");
7f4c2a
                 }
7f4c2a
         }
7f4c2a
 
7f4c2a
@@ -588,10 +588,10 @@ out:
7f4c2a
                                       " %s", strerror
7f4c2a
                                           (gf_error_to_errno (rsp.op_errno)));
7f4c2a
                 } else {
7f4c2a
-                        gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                        gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                                gf_error_to_errno (rsp.op_errno),
7f4c2a
                                 PC_MSG_REMOTE_OP_FAILED, "remote operation "
7f4c2a
-                                "failed: %s", strerror
7f4c2a
-                                           (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                                "failed");
7f4c2a
                 }
7f4c2a
         }
7f4c2a
 
7f4c2a
@@ -659,10 +659,9 @@ out:
7f4c2a
                                       (gf_error_to_errno (rsp.op_errno)));
7f4c2a
                 } else {
7f4c2a
                         gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
-                                rsp.op_errno,
7f4c2a
+                                gf_error_to_errno (rsp.op_errno),
7f4c2a
                                 PC_MSG_REMOTE_OP_FAILED, "remote operation "
7f4c2a
-                                "failed: %s", strerror
7f4c2a
-                                (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                                "failed");
7f4c2a
                 }
7f4c2a
         }
7f4c2a
 
7f4c2a
@@ -720,9 +719,9 @@ client3_3_rmdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
-                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
+                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (rmdir, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), &preparent,
7f4c2a
@@ -779,10 +778,10 @@ client3_3_truncate_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (truncate, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), &prestat,
7f4c2a
@@ -837,10 +836,10 @@ client3_3_statfs_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (statfs, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), &statfs, xdata);
7f4c2a
@@ -899,10 +898,10 @@ client3_3_writev_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         } else if (rsp.op_ret >= 0) {
7f4c2a
                 if (local->attempt_reopen)
7f4c2a
                         client_attempt_reopen (local->fd, this);
7f4c2a
@@ -965,10 +964,9 @@ out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
                 gf_msg (this->name, fop_log_level (GF_FOP_FLUSH,
7f4c2a
                         gf_error_to_errno (rsp.op_errno)),
7f4c2a
-                        rsp.op_errno,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (flush, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), xdata);
7f4c2a
@@ -1024,10 +1022,10 @@ client3_3_fsync_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (fsync, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), &prestat,
7f4c2a
@@ -1084,7 +1082,7 @@ out:
7f4c2a
                 } else {
7f4c2a
                         gf_msg (this->name, GF_LOG_WARNING, op_errno,
7f4c2a
                                 PC_MSG_REMOTE_OP_FAILED, "remote operation "
7f4c2a
-                                "failed: %s", strerror (op_errno));
7f4c2a
+                                "failed");
7f4c2a
                 }
7f4c2a
         }
7f4c2a
 
7f4c2a
@@ -1157,8 +1155,8 @@ out:
7f4c2a
                 } else {
7f4c2a
                         gf_msg (this->name, GF_LOG_WARNING, op_errno,
7f4c2a
                                 PC_MSG_REMOTE_OP_FAILED, "remote operation "
7f4c2a
-                                "failed: %s. Path: %s (%s). Key: %s",
7f4c2a
-                                strerror (op_errno), local->loc.path,
7f4c2a
+                                "failed. Path: %s (%s). Key: %s",
7f4c2a
+                                local->loc.path,
7f4c2a
                                 loc_gfid_utoa (&local->loc),
7f4c2a
                                 (local->name) ? local->name : "(null)");
7f4c2a
                 }
7f4c2a
@@ -1234,7 +1232,7 @@ out:
7f4c2a
                 } else {
7f4c2a
                         gf_msg (this->name, GF_LOG_WARNING, op_errno,
7f4c2a
                                 PC_MSG_REMOTE_OP_FAILED, "remote operation "
7f4c2a
-                                "failed: %s", strerror (op_errno));
7f4c2a
+                                "failed");
7f4c2a
                 }
7f4c2a
         }
7f4c2a
 
7f4c2a
@@ -1294,10 +1292,10 @@ out:
7f4c2a
                 else
7f4c2a
                         loglevel = GF_LOG_WARNING;
7f4c2a
 
7f4c2a
-                gf_msg (this->name, loglevel, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, loglevel,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
 
7f4c2a
         CLIENT_STACK_UNWIND (removexattr, frame, rsp.op_ret,
7f4c2a
@@ -1347,10 +1345,10 @@ client3_3_fremovexattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (fremovexattr, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), xdata);
7f4c2a
@@ -1398,10 +1396,10 @@ client3_3_fsyncdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (fsyncdir, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), xdata);
7f4c2a
@@ -1449,10 +1447,10 @@ client3_3_access_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (access, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), xdata);
7f4c2a
@@ -1508,10 +1506,10 @@ client3_3_ftruncate_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (ftruncate, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), &prestat,
7f4c2a
@@ -1565,10 +1563,10 @@ client3_3_fstat_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (fstat, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), &stat,  xdata);
7f4c2a
@@ -1618,9 +1616,9 @@ client3_3_inodelk_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
                 gf_msg (this->name, fop_log_level (GF_FOP_INODELK,
7f4c2a
-                        gf_error_to_errno (rsp.op_errno)), rsp.op_errno,
7f4c2a
-                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed: "
7f4c2a
-                        "%s", strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        gf_error_to_errno (rsp.op_errno)),
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
+                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (inodelk, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), xdata);
7f4c2a
@@ -1670,9 +1668,9 @@ client3_3_finodelk_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
                 gf_msg (this->name, fop_log_level (GF_FOP_FINODELK,
7f4c2a
-                        gf_error_to_errno (rsp.op_errno)), rsp.op_errno,
7f4c2a
-                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed: "
7f4c2a
-                        "%s", strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        gf_error_to_errno (rsp.op_errno)),
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
+                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed");
7f4c2a
         } else if (rsp.op_ret == 0) {
7f4c2a
                 if (local->attempt_reopen)
7f4c2a
                         client_attempt_reopen (local->fd, this);
7f4c2a
@@ -1724,9 +1722,9 @@ client3_3_entrylk_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
                 gf_msg (this->name, fop_log_level (GF_FOP_ENTRYLK,
7f4c2a
-                        gf_error_to_errno (rsp.op_errno)), rsp.op_errno,
7f4c2a
-                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed: "
7f4c2a
-                        "%s", strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        gf_error_to_errno (rsp.op_errno)),
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
+                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed");
7f4c2a
         }
7f4c2a
 
7f4c2a
         CLIENT_STACK_UNWIND (entrylk, frame, rsp.op_ret,
7f4c2a
@@ -1776,10 +1774,10 @@ client3_3_fentrylk_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 out:
7f4c2a
         if ((rsp.op_ret == -1) &&
7f4c2a
             (EAGAIN != gf_error_to_errno (rsp.op_errno))) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
 
7f4c2a
         CLIENT_STACK_UNWIND (fentrylk, frame, rsp.op_ret,
7f4c2a
@@ -1840,10 +1838,10 @@ client3_3_xattrop_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
-                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed: "
7f4c2a
-                        "%s. Path: %s (%s)",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)),
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
+                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed. "
7f4c2a
+                        "Path: %s (%s)",
7f4c2a
                         local->loc.path, loc_gfid_utoa (&local->loc));
7f4c2a
         }
7f4c2a
 
7f4c2a
@@ -1910,10 +1908,10 @@ client3_3_fxattrop_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 out:
7f4c2a
 
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         } else if (rsp.op_ret == 0) {
7f4c2a
                 if (local->attempt_reopen)
7f4c2a
                         client_attempt_reopen (local->fd, this);
7f4c2a
@@ -1976,7 +1974,7 @@ out:
7f4c2a
                 } else {
7f4c2a
                         gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
                                 PC_MSG_REMOTE_OP_FAILED, "remote operation "
7f4c2a
-                                "failed: %s", strerror (op_errno));
7f4c2a
+                                "failed");
7f4c2a
                 }
7f4c2a
         }
7f4c2a
 
7f4c2a
@@ -2032,10 +2030,10 @@ client3_3_fsetattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (fsetattr, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), &prestat,
7f4c2a
@@ -2091,10 +2089,10 @@ client3_3_fallocate_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (fallocate, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), &prestat,
7f4c2a
@@ -2149,10 +2147,10 @@ client3_3_discard_cbk(struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (discard, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), &prestat,
7f4c2a
@@ -2207,10 +2205,10 @@ client3_3_zerofill_cbk(struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (zerofill, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), &prestat,
7f4c2a
@@ -2258,10 +2256,10 @@ client3_3_ipc_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (ipc, frame,
7f4c2a
                              rsp.op_ret, gf_error_to_errno (rsp.op_errno),
7f4c2a
@@ -2318,10 +2316,10 @@ client3_3_setattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (setattr, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), &prestat,
7f4c2a
@@ -2394,10 +2392,10 @@ client3_3_create_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s. Path: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)),
7f4c2a
+                        "remote operation failed. Path: %s",
7f4c2a
                         local->loc.path);
7f4c2a
         }
7f4c2a
 
7f4c2a
@@ -2450,10 +2448,10 @@ client3_3_rchecksum_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (rchecksum, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno),
7f4c2a
@@ -2532,10 +2530,10 @@ client3_3_lk_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 out:
7f4c2a
         if ((rsp.op_ret == -1) &&
7f4c2a
             (EAGAIN != gf_error_to_errno (rsp.op_errno))) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
 
7f4c2a
         CLIENT_STACK_UNWIND (lk, frame, rsp.op_ret,
7f4c2a
@@ -2595,11 +2593,11 @@ client3_3_readdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s remote_fd = %d",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)),
7f4c2a
-                                  local->cmd);
7f4c2a
+                        "remote operation failed: remote_fd = %d",
7f4c2a
+                        local->cmd);
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (readdir, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), &entries, xdata);
7f4c2a
@@ -2662,10 +2660,10 @@ client3_3_readdirp_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (readdirp, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno), &entries, xdata);
7f4c2a
@@ -2734,10 +2732,10 @@ client3_3_rename_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (rename, frame, rsp.op_ret,
7f4c2a
                              gf_error_to_errno (rsp.op_errno),
7f4c2a
@@ -2804,10 +2802,10 @@ client3_3_link_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
                 if (GF_IGNORE_IF_GSYNCD_SAFE_ERROR(frame, rsp.op_errno)) {
7f4c2a
-                        gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                        gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                                gf_error_to_errno (rsp.op_errno),
7f4c2a
                                 PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                                "remote operation failed: %s (%s -> %s)",
7f4c2a
-                                strerror (gf_error_to_errno (rsp.op_errno)),
7f4c2a
+                                "remote operation failed: (%s -> %s)",
7f4c2a
                                 local->loc.path, local->loc2.path);
7f4c2a
                 }
7f4c2a
         }
7f4c2a
@@ -2878,10 +2876,10 @@ client3_3_opendir_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
                 gf_msg (this->name, fop_log_level (GF_FOP_OPENDIR,
7f4c2a
-                        gf_error_to_errno (rsp.op_errno)), rsp.op_errno,
7f4c2a
-                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed: "
7f4c2a
-                        "%s. Path: %s (%s)",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)),
7f4c2a
+                        gf_error_to_errno (rsp.op_errno)),
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
+                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed."
7f4c2a
+                        " Path: %s (%s)",
7f4c2a
                         local->loc.path, loc_gfid_utoa (&local->loc));
7f4c2a
         }
7f4c2a
         CLIENT_STACK_UNWIND (opendir, frame, rsp.op_ret,
7f4c2a
@@ -2968,8 +2966,8 @@ out:
7f4c2a
 		    !(rsp.op_errno == ESTALE))
7f4c2a
                         gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
                                 PC_MSG_REMOTE_OP_FAILED, "remote operation "
7f4c2a
-                                "failed: %s. Path: %s (%s)",
7f4c2a
-                                strerror (rsp.op_errno), local->loc.path,
7f4c2a
+                                "failed. Path: %s (%s)",
7f4c2a
+                                local->loc.path,
7f4c2a
                                 loc_gfid_utoa (&local->loc));
7f4c2a
                 else
7f4c2a
                         gf_msg_trace (this->name, 0, "not found on remote "
7f4c2a
@@ -3043,10 +3041,10 @@ client3_3_readv_cbk (struct rpc_req *req, struct iovec *iov, int count,
7f4c2a
 
7f4c2a
 out:
7f4c2a
         if (rsp.op_ret == -1) {
7f4c2a
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
7f4c2a
+                gf_msg (this->name, GF_LOG_WARNING,
7f4c2a
+                        gf_error_to_errno (rsp.op_errno),
7f4c2a
                         PC_MSG_REMOTE_OP_FAILED,
7f4c2a
-                        "remote operation failed: %s",
7f4c2a
-                        strerror (gf_error_to_errno (rsp.op_errno)));
7f4c2a
+                        "remote operation failed");
7f4c2a
         } else if (rsp.op_ret >= 0) {
7f4c2a
                 if (local->attempt_reopen)
7f4c2a
                         client_attempt_reopen (local->fd, this);
7f4c2a
-- 
7f4c2a
1.7.1
7f4c2a