summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-rpc-fops.c
diff options
context:
space:
mode:
authorManikandan Selvaganesh <mselvaga@redhat.com>2015-06-17 18:42:06 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-06-27 05:04:47 -0700
commit9ed31ab1a5718e01b22ea9e39c28759759bf023c (patch)
tree8e5184fcbd29e685cbfffa2e9e0de3d3b8b2d07b /xlators/protocol/client/src/client-rpc-fops.c
parente28ac41c5ffc7b87f09b5bf2fe7f43cd4d4a5af5 (diff)
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(), the 5th argument is removed. Backport of http://review.gluster.org/#/c/11280/ Cherry picked from commit 4acd9d1bfc2be5179ddb611f61afaaeaa15be2cb > Change-Id: Ib1794ea2d4cb5c46a39311f0afcfd7e494540506 > BUG: 1194640 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-on: http://review.gluster.org/11280 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> > Reviewed-by: Vijay Bellur <vbellur@redhat.com> Change-Id: Ib1794ea2d4cb5c46a39311f0afcfd7e494540506 BUG: 1217722 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/11374 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client-rpc-fops.c')
-rw-r--r--xlators/protocol/client/src/client-rpc-fops.c258
1 files changed, 128 insertions, 130 deletions
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
index 223a60d68be..9512087e413 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);