Blob Blame History Raw
From d65ecec648d5681044c01279f62c11925e752c87 Mon Sep 17 00:00:00 2001
From: Manikandan Selvaganesh <mselvaga@redhat.com>
Date: Wed, 17 Jun 2015 18:42:06 +0530
Subject: [PATCH 141/190] protocol/client : removing duplicate printing in gf_msg

Since the 3rd and 5th argument of gf_msg framework
prints the error string in case of strerror(),
5th argument is removed.

Change-Id: Ib1794ea2d4cb5c46a39311f0afcfd7e494540506
BUG: 1231775
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/51100
Reviewed-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
Tested-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
---
 xlators/protocol/client/src/client-handshake.c |   23 +-
 xlators/protocol/client/src/client-rpc-fops.c  |  258 ++++++++++++------------
 2 files changed, 139 insertions(+), 142 deletions(-)

diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index 457fa25..d45bf95 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -719,9 +719,9 @@ client3_3_reopen_cbk (struct rpc_req *req, struct iovec *iov, int count,
         }
 
         if (rsp.op_ret < 0) {
-                gf_msg (frame->this->name, GF_LOG_WARNING, 0,
-                        PC_MSG_DIR_OP_SUCCESS, "reopen on %s failed (%s)",
-                        local->loc.path, strerror (rsp.op_errno));
+                gf_msg (frame->this->name, GF_LOG_WARNING, rsp.op_errno,
+                        PC_MSG_DIR_OP_SUCCESS, "reopen on %s failed.",
+                        local->loc.path);
         } else {
                 gf_msg_debug (frame->this->name, 0,
                               "reopen on %s succeeded (remote-fd = %"PRId64")",
@@ -811,9 +811,9 @@ client3_3_reopendir_cbk (struct rpc_req *req, struct iovec *iov, int count,
         }
 
         if (rsp.op_ret < 0) {
-                gf_msg (frame->this->name, GF_LOG_WARNING, 0,
-                        PC_MSG_DIR_OP_FAILED, "reopendir on %s failed (%s)",
-                        local->loc.path, strerror (rsp.op_errno));
+                gf_msg (frame->this->name, GF_LOG_WARNING, rsp.op_errno,
+                        PC_MSG_DIR_OP_FAILED, "reopendir on %s failed",
+                        local->loc.path);
         } else {
                 gf_msg (frame->this->name, GF_LOG_INFO, 0,
                         PC_MSG_DIR_OP_SUCCESS, "reopendir on %s succeeded "
@@ -1110,9 +1110,8 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m
         op_ret   = rsp.op_ret;
         op_errno = gf_error_to_errno (rsp.op_errno);
         if (-1 == rsp.op_ret) {
-                gf_msg (frame->this->name, GF_LOG_WARNING, 0,
-                        PC_MSG_VOL_SET_FAIL, "failed to set the volume (%s)",
-                        (op_errno)? strerror (op_errno) : "--");
+                gf_msg (frame->this->name, GF_LOG_WARNING, op_errno,
+                        PC_MSG_VOL_SET_FAIL, "failed to set the volume");
         }
 
         reply = dict_new ();
@@ -1145,9 +1144,9 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m
         }
 
         if (op_ret < 0) {
-                gf_msg (this->name, GF_LOG_ERROR, 0, PC_MSG_SETVOLUME_FAIL,
-                        "SETVOLUME on remote-host failed: %s",
-                        remote_error ? remote_error : strerror (op_errno));
+                gf_msg (this->name, GF_LOG_ERROR, op_errno,
+                        PC_MSG_SETVOLUME_FAIL,
+                        "SETVOLUME on remote-host failed");
                 errno = op_errno;
                 if (remote_error &&
                     (strcmp ("Authentication failed", remote_error) == 0)) {
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
index 223a60d..9512087 100644
--- a/xlators/protocol/client/src/client-rpc-fops.c
+++ b/xlators/protocol/client/src/client-rpc-fops.c
@@ -171,10 +171,10 @@ out:
                         /* no need to print the gfid, because it will be null,
                          * since symlink operation failed.
                          */
-                        gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                        gf_msg (this->name, GF_LOG_WARNING,
+                                gf_error_to_errno (rsp.op_errno),
                                 PC_MSG_REMOTE_OP_FAILED,
-                                "remote operation failed: %s. Path: (%s to %s)",
-                                strerror (gf_error_to_errno (rsp.op_errno)),
+                                "remote operation failed. Path: (%s to %s)",
                                 local->loc.path, local->loc2.path);
                 }
         }
@@ -245,9 +245,9 @@ out:
             GF_IGNORE_IF_GSYNCD_SAFE_ERROR(frame, rsp.op_errno)) {
                 gf_msg (this->name, fop_log_level (GF_FOP_MKNOD,
                         gf_error_to_errno (rsp.op_errno)),
-                        rsp.op_errno, PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s. Path: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)),
+                        gf_error_to_errno (rsp.op_errno),
+                        PC_MSG_REMOTE_OP_FAILED,
+                        "remote operation failed. Path: %s",
                         local->loc.path);
         }
 
@@ -314,10 +314,10 @@ out:
         if (rsp.op_ret == -1 &&
             GF_IGNORE_IF_GSYNCD_SAFE_ERROR(frame, rsp.op_errno)) {
                 gf_msg (this->name, fop_log_level (GF_FOP_MKDIR,
-                        gf_error_to_errno (rsp.op_errno)), rsp.op_errno,
+                        gf_error_to_errno (rsp.op_errno)),
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s. Path: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)),
+                        "remote operation failed. Path: %s",
                         local->loc.path);
         }
 
@@ -460,9 +460,9 @@ out:
         if (rsp.op_ret == -1) {
                 gf_msg (this->name, fop_log_level (GF_FOP_OPEN,
                         gf_error_to_errno (rsp.op_errno)),
-                        rsp.op_errno, PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s. Path: %s (%s)",
-                        strerror (gf_error_to_errno (rsp.op_errno)),
+                        gf_error_to_errno (rsp.op_errno),
+                        PC_MSG_REMOTE_OP_FAILED,
+                        "remote operation failed. Path: %s (%s)",
                         local->loc.path, loc_gfid_utoa (&local->loc));
         }
 
@@ -525,10 +525,10 @@ out:
                                       strerror (gf_error_to_errno
                                                 (rsp.op_errno)));
                 } else {
-                        gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                        gf_msg (this->name, GF_LOG_WARNING,
+                                gf_error_to_errno (rsp.op_errno),
                                 PC_MSG_REMOTE_OP_FAILED,
-                                "remote operation failed: %s",
-                                strerror (gf_error_to_errno (rsp.op_errno)));
+                                "remote operation failed");
                 }
         }
 
@@ -588,10 +588,10 @@ out:
                                       " %s", strerror
                                           (gf_error_to_errno (rsp.op_errno)));
                 } else {
-                        gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                        gf_msg (this->name, GF_LOG_WARNING,
+                                gf_error_to_errno (rsp.op_errno),
                                 PC_MSG_REMOTE_OP_FAILED, "remote operation "
-                                "failed: %s", strerror
-                                           (gf_error_to_errno (rsp.op_errno)));
+                                "failed");
                 }
         }
 
@@ -659,10 +659,9 @@ out:
                                       (gf_error_to_errno (rsp.op_errno)));
                 } else {
                         gf_msg (this->name, GF_LOG_WARNING,
-                                rsp.op_errno,
+                                gf_error_to_errno (rsp.op_errno),
                                 PC_MSG_REMOTE_OP_FAILED, "remote operation "
-                                "failed: %s", strerror
-                                (gf_error_to_errno (rsp.op_errno)));
+                                "failed");
                 }
         }
 
@@ -720,9 +719,9 @@ client3_3_rmdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
-                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
+                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed");
         }
         CLIENT_STACK_UNWIND (rmdir, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), &preparent,
@@ -779,10 +778,10 @@ client3_3_truncate_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (truncate, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), &prestat,
@@ -837,10 +836,10 @@ client3_3_statfs_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (statfs, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), &statfs, xdata);
@@ -899,10 +898,10 @@ client3_3_writev_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         } else if (rsp.op_ret >= 0) {
                 if (local->attempt_reopen)
                         client_attempt_reopen (local->fd, this);
@@ -965,10 +964,9 @@ out:
         if (rsp.op_ret == -1) {
                 gf_msg (this->name, fop_log_level (GF_FOP_FLUSH,
                         gf_error_to_errno (rsp.op_errno)),
-                        rsp.op_errno,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (flush, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), xdata);
@@ -1024,10 +1022,10 @@ client3_3_fsync_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (fsync, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), &prestat,
@@ -1084,7 +1082,7 @@ out:
                 } else {
                         gf_msg (this->name, GF_LOG_WARNING, op_errno,
                                 PC_MSG_REMOTE_OP_FAILED, "remote operation "
-                                "failed: %s", strerror (op_errno));
+                                "failed");
                 }
         }
 
@@ -1157,8 +1155,8 @@ out:
                 } else {
                         gf_msg (this->name, GF_LOG_WARNING, op_errno,
                                 PC_MSG_REMOTE_OP_FAILED, "remote operation "
-                                "failed: %s. Path: %s (%s). Key: %s",
-                                strerror (op_errno), local->loc.path,
+                                "failed. Path: %s (%s). Key: %s",
+                                local->loc.path,
                                 loc_gfid_utoa (&local->loc),
                                 (local->name) ? local->name : "(null)");
                 }
@@ -1234,7 +1232,7 @@ out:
                 } else {
                         gf_msg (this->name, GF_LOG_WARNING, op_errno,
                                 PC_MSG_REMOTE_OP_FAILED, "remote operation "
-                                "failed: %s", strerror (op_errno));
+                                "failed");
                 }
         }
 
@@ -1294,10 +1292,10 @@ out:
                 else
                         loglevel = GF_LOG_WARNING;
 
-                gf_msg (this->name, loglevel, rsp.op_errno,
+                gf_msg (this->name, loglevel,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
 
         CLIENT_STACK_UNWIND (removexattr, frame, rsp.op_ret,
@@ -1347,10 +1345,10 @@ client3_3_fremovexattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (fremovexattr, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), xdata);
@@ -1398,10 +1396,10 @@ client3_3_fsyncdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (fsyncdir, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), xdata);
@@ -1449,10 +1447,10 @@ client3_3_access_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (access, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), xdata);
@@ -1508,10 +1506,10 @@ client3_3_ftruncate_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (ftruncate, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), &prestat,
@@ -1565,10 +1563,10 @@ client3_3_fstat_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (fstat, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), &stat,  xdata);
@@ -1618,9 +1616,9 @@ client3_3_inodelk_cbk (struct rpc_req *req, struct iovec *iov, int count,
 out:
         if (rsp.op_ret == -1) {
                 gf_msg (this->name, fop_log_level (GF_FOP_INODELK,
-                        gf_error_to_errno (rsp.op_errno)), rsp.op_errno,
-                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed: "
-                        "%s", strerror (gf_error_to_errno (rsp.op_errno)));
+                        gf_error_to_errno (rsp.op_errno)),
+                        gf_error_to_errno (rsp.op_errno),
+                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed");
         }
         CLIENT_STACK_UNWIND (inodelk, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), xdata);
@@ -1670,9 +1668,9 @@ client3_3_finodelk_cbk (struct rpc_req *req, struct iovec *iov, int count,
 out:
         if (rsp.op_ret == -1) {
                 gf_msg (this->name, fop_log_level (GF_FOP_FINODELK,
-                        gf_error_to_errno (rsp.op_errno)), rsp.op_errno,
-                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed: "
-                        "%s", strerror (gf_error_to_errno (rsp.op_errno)));
+                        gf_error_to_errno (rsp.op_errno)),
+                        gf_error_to_errno (rsp.op_errno),
+                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed");
         } else if (rsp.op_ret == 0) {
                 if (local->attempt_reopen)
                         client_attempt_reopen (local->fd, this);
@@ -1724,9 +1722,9 @@ client3_3_entrylk_cbk (struct rpc_req *req, struct iovec *iov, int count,
 out:
         if (rsp.op_ret == -1) {
                 gf_msg (this->name, fop_log_level (GF_FOP_ENTRYLK,
-                        gf_error_to_errno (rsp.op_errno)), rsp.op_errno,
-                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed: "
-                        "%s", strerror (gf_error_to_errno (rsp.op_errno)));
+                        gf_error_to_errno (rsp.op_errno)),
+                        gf_error_to_errno (rsp.op_errno),
+                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed");
         }
 
         CLIENT_STACK_UNWIND (entrylk, frame, rsp.op_ret,
@@ -1776,10 +1774,10 @@ client3_3_fentrylk_cbk (struct rpc_req *req, struct iovec *iov, int count,
 out:
         if ((rsp.op_ret == -1) &&
             (EAGAIN != gf_error_to_errno (rsp.op_errno))) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
 
         CLIENT_STACK_UNWIND (fentrylk, frame, rsp.op_ret,
@@ -1840,10 +1838,10 @@ client3_3_xattrop_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
-                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed: "
-                        "%s. Path: %s (%s)",
-                        strerror (gf_error_to_errno (rsp.op_errno)),
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
+                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed. "
+                        "Path: %s (%s)",
                         local->loc.path, loc_gfid_utoa (&local->loc));
         }
 
@@ -1910,10 +1908,10 @@ client3_3_fxattrop_cbk (struct rpc_req *req, struct iovec *iov, int count,
 out:
 
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (op_errno)));
+                        "remote operation failed");
         } else if (rsp.op_ret == 0) {
                 if (local->attempt_reopen)
                         client_attempt_reopen (local->fd, this);
@@ -1976,7 +1974,7 @@ out:
                 } else {
                         gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
                                 PC_MSG_REMOTE_OP_FAILED, "remote operation "
-                                "failed: %s", strerror (op_errno));
+                                "failed");
                 }
         }
 
@@ -2032,10 +2030,10 @@ client3_3_fsetattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (fsetattr, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), &prestat,
@@ -2091,10 +2089,10 @@ client3_3_fallocate_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (fallocate, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), &prestat,
@@ -2149,10 +2147,10 @@ client3_3_discard_cbk(struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (discard, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), &prestat,
@@ -2207,10 +2205,10 @@ client3_3_zerofill_cbk(struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (zerofill, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), &prestat,
@@ -2258,10 +2256,10 @@ client3_3_ipc_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (ipc, frame,
                              rsp.op_ret, gf_error_to_errno (rsp.op_errno),
@@ -2318,10 +2316,10 @@ client3_3_setattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (setattr, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), &prestat,
@@ -2394,10 +2392,10 @@ client3_3_create_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s. Path: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)),
+                        "remote operation failed. Path: %s",
                         local->loc.path);
         }
 
@@ -2450,10 +2448,10 @@ client3_3_rchecksum_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (rchecksum, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno),
@@ -2532,10 +2530,10 @@ client3_3_lk_cbk (struct rpc_req *req, struct iovec *iov, int count,
 out:
         if ((rsp.op_ret == -1) &&
             (EAGAIN != gf_error_to_errno (rsp.op_errno))) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
 
         CLIENT_STACK_UNWIND (lk, frame, rsp.op_ret,
@@ -2595,11 +2593,11 @@ client3_3_readdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s remote_fd = %d",
-                        strerror (gf_error_to_errno (rsp.op_errno)),
-                                  local->cmd);
+                        "remote operation failed: remote_fd = %d",
+                        local->cmd);
         }
         CLIENT_STACK_UNWIND (readdir, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), &entries, xdata);
@@ -2662,10 +2660,10 @@ client3_3_readdirp_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (readdirp, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno), &entries, xdata);
@@ -2734,10 +2732,10 @@ client3_3_rename_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         }
         CLIENT_STACK_UNWIND (rename, frame, rsp.op_ret,
                              gf_error_to_errno (rsp.op_errno),
@@ -2804,10 +2802,10 @@ client3_3_link_cbk (struct rpc_req *req, struct iovec *iov, int count,
 out:
         if (rsp.op_ret == -1) {
                 if (GF_IGNORE_IF_GSYNCD_SAFE_ERROR(frame, rsp.op_errno)) {
-                        gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                        gf_msg (this->name, GF_LOG_WARNING,
+                                gf_error_to_errno (rsp.op_errno),
                                 PC_MSG_REMOTE_OP_FAILED,
-                                "remote operation failed: %s (%s -> %s)",
-                                strerror (gf_error_to_errno (rsp.op_errno)),
+                                "remote operation failed: (%s -> %s)",
                                 local->loc.path, local->loc2.path);
                 }
         }
@@ -2878,10 +2876,10 @@ client3_3_opendir_cbk (struct rpc_req *req, struct iovec *iov, int count,
 out:
         if (rsp.op_ret == -1) {
                 gf_msg (this->name, fop_log_level (GF_FOP_OPENDIR,
-                        gf_error_to_errno (rsp.op_errno)), rsp.op_errno,
-                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed: "
-                        "%s. Path: %s (%s)",
-                        strerror (gf_error_to_errno (rsp.op_errno)),
+                        gf_error_to_errno (rsp.op_errno)),
+                        gf_error_to_errno (rsp.op_errno),
+                        PC_MSG_REMOTE_OP_FAILED, "remote operation failed."
+                        " Path: %s (%s)",
                         local->loc.path, loc_gfid_utoa (&local->loc));
         }
         CLIENT_STACK_UNWIND (opendir, frame, rsp.op_ret,
@@ -2968,8 +2966,8 @@ out:
 		    !(rsp.op_errno == ESTALE))
                         gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
                                 PC_MSG_REMOTE_OP_FAILED, "remote operation "
-                                "failed: %s. Path: %s (%s)",
-                                strerror (rsp.op_errno), local->loc.path,
+                                "failed. Path: %s (%s)",
+                                local->loc.path,
                                 loc_gfid_utoa (&local->loc));
                 else
                         gf_msg_trace (this->name, 0, "not found on remote "
@@ -3043,10 +3041,10 @@ client3_3_readv_cbk (struct rpc_req *req, struct iovec *iov, int count,
 
 out:
         if (rsp.op_ret == -1) {
-                gf_msg (this->name, GF_LOG_WARNING, rsp.op_errno,
+                gf_msg (this->name, GF_LOG_WARNING,
+                        gf_error_to_errno (rsp.op_errno),
                         PC_MSG_REMOTE_OP_FAILED,
-                        "remote operation failed: %s",
-                        strerror (gf_error_to_errno (rsp.op_errno)));
+                        "remote operation failed");
         } else if (rsp.op_ret >= 0) {
                 if (local->attempt_reopen)
                         client_attempt_reopen (local->fd, this);
-- 
1.7.1