summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRajesh Amaravathi <rajesh.amaravathi@gmail.com>2011-09-02 15:10:30 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-18 22:28:09 -0700
commit35bbb34a3f4a74f0d2288aacd984c71c7ebdfa3c (patch)
tree1495828144fa032c969a89944bc8035a02948be0 /xlators
parent9eec7900639684e5a2fd80b273437fefe6b5b930 (diff)
protocol/client: log enhancements
* print paths wherever it is possible to log, to help debugging. * bring uniformity in log level. Change-Id: I2fa85b629de5dd0f0057ed96cba08ecb0ff1a798 BUG: 3473 Reviewed-on: http://review.gluster.com/328 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c199
1 files changed, 109 insertions, 90 deletions
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c
index 700e5da6b..8e2c153d4 100644
--- a/xlators/protocol/client/src/client3_1-fops.c
+++ b/xlators/protocol/client/src/client3_1-fops.c
@@ -171,15 +171,16 @@ client3_1_symlink_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
frame->local = NULL;
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (gf_error_to_errno (rsp.op_errno)));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (gf_error_to_errno (rsp.op_errno)),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (symlink, frame, rsp.op_ret,
gf_error_to_errno (rsp.op_errno), inode, &stbuf,
&preparent, &postparent);
- if (local)
- client_local_wipe (local);
+ client_local_wipe (local);
return 0;
}
@@ -230,15 +231,16 @@ client3_1_mknod_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
frame->local = NULL;
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_ERROR, "remote operation failed: %s",
- strerror (gf_error_to_errno (rsp.op_errno)));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (gf_error_to_errno (rsp.op_errno)),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (mknod, frame, rsp.op_ret,
gf_error_to_errno (rsp.op_errno), inode,
&stbuf, &preparent, &postparent);
- if (local)
- client_local_wipe (local);
+ client_local_wipe (local);
return 0;
}
@@ -262,7 +264,6 @@ client3_1_mkdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
frame = myframe;
local = frame->local;
- frame->local = NULL;
inode = local->loc.inode;
if (-1 == req->rpc_status) {
@@ -286,16 +287,18 @@ client3_1_mkdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
out:
+ frame->local = NULL;
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (gf_error_to_errno (rsp.op_errno)));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (gf_error_to_errno (rsp.op_errno)),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (mkdir, frame, rsp.op_ret,
gf_error_to_errno (rsp.op_errno), inode,
&stbuf, &preparent, &postparent);
- if (local)
- client_local_wipe (local);
+ client_local_wipe (local);
return 0;
}
@@ -364,8 +367,10 @@ client3_1_open_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
frame->local = NULL;
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (gf_error_to_errno (rsp.op_errno)));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (gf_error_to_errno (rsp.op_errno)),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (open, frame, rsp.op_ret,
gf_error_to_errno (rsp.op_errno), fd);
@@ -409,7 +414,7 @@ client3_1_stat_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (stat, frame, rsp.op_ret,
@@ -451,7 +456,7 @@ client3_1_readlink_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (readlink, frame, rsp.op_ret,
@@ -500,7 +505,7 @@ client3_1_unlink_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (unlink, frame, rsp.op_ret,
@@ -545,7 +550,7 @@ client3_1_rmdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (rmdir, frame, rsp.op_ret,
@@ -591,7 +596,7 @@ client3_1_truncate_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (truncate, frame, rsp.op_ret,
@@ -635,7 +640,7 @@ client3_1_statfs_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (statfs, frame, rsp.op_ret,
@@ -681,7 +686,7 @@ client3_1_writev_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (writev, frame, rsp.op_ret,
@@ -726,18 +731,19 @@ client3_1_flush_cbk (struct rpc_req *req, struct iovec *iov, int count,
(long long unsigned) local->owner, ret);
}
- frame->local = NULL;
- if (local)
- client_local_wipe (local);
-
out:
+ frame->local = NULL;
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (gf_error_to_errno (rsp.op_errno)));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (gf_error_to_errno (rsp.op_errno)),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (flush, frame, rsp.op_ret,
gf_error_to_errno (rsp.op_errno));
+ client_local_wipe (local);
+
return 0;
}
@@ -777,7 +783,7 @@ client3_1_fsync_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (fsync, frame, rsp.op_ret,
@@ -816,7 +822,7 @@ client3_1_setxattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (setxattr, frame, rsp.op_ret,
@@ -888,8 +894,10 @@ client3_1_getxattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (op_errno));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (op_errno),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (getxattr, frame, op_ret, op_errno, dict);
@@ -971,8 +979,10 @@ client3_1_fgetxattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (op_errno));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (op_errno),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (fgetxattr, frame, op_ret, op_errno, dict);
if (rsp.dict.dict_val) {
@@ -988,8 +998,7 @@ out:
if (dict)
dict_unref (dict);
- if (local)
- client_local_wipe (local);
+ client_local_wipe (local);
return 0;
}
@@ -1023,7 +1032,7 @@ client3_1_removexattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (removexattr, frame, rsp.op_ret,
@@ -1060,7 +1069,7 @@ client3_1_fsyncdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (fsyncdir, frame, rsp.op_ret,
@@ -1097,7 +1106,7 @@ client3_1_access_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (access, frame, rsp.op_ret,
@@ -1142,7 +1151,7 @@ client3_1_ftruncate_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (ftruncate, frame, rsp.op_ret,
@@ -1185,7 +1194,7 @@ client3_1_fstat_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (fstat, frame, rsp.op_ret,
@@ -1224,7 +1233,7 @@ client3_1_inodelk_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_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (inodelk, frame, rsp.op_ret,
@@ -1262,7 +1271,7 @@ client3_1_finodelk_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_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (finodelk, frame, rsp.op_ret,
@@ -1301,7 +1310,7 @@ out:
if ((rsp.op_ret == -1) &&
(EAGAIN != gf_error_to_errno (rsp.op_errno))) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (entrylk, frame, rsp.op_ret,
@@ -1339,7 +1348,7 @@ client3_1_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_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (fentrylk, frame, rsp.op_ret,
@@ -1410,8 +1419,10 @@ client3_1_xattrop_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (gf_error_to_errno (rsp.op_errno)));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (gf_error_to_errno (rsp.op_errno)),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (xattrop, frame, op_ret,
gf_error_to_errno (op_errno), dict);
@@ -1496,8 +1507,10 @@ client3_1_fxattrop_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (gf_error_to_errno (rsp.op_errno)));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (gf_error_to_errno (rsp.op_errno)),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (fxattrop, frame, op_ret,
gf_error_to_errno (op_errno), dict);
@@ -1547,7 +1560,7 @@ client3_1_fsetxattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (fsetxattr, frame, rsp.op_ret,
@@ -1591,7 +1604,7 @@ client3_1_fsetattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (fsetattr, frame, rsp.op_ret,
@@ -1638,7 +1651,7 @@ client3_1_setattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (setattr, frame, rsp.op_ret,
@@ -1720,8 +1733,10 @@ client3_1_create_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
frame->local = NULL;
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (gf_error_to_errno (rsp.op_errno)));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (gf_error_to_errno (rsp.op_errno)),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (create, frame, rsp.op_ret,
gf_error_to_errno (rsp.op_errno), fd, inode,
@@ -1761,7 +1776,7 @@ client3_1_rchecksum_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (rchecksum, frame, rsp.op_ret,
@@ -1826,18 +1841,19 @@ client3_1_lk_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
*/
- frame->local = NULL;
- client_local_wipe (local);
-
out:
+ frame->local = NULL;
if ((rsp.op_ret == -1) &&
(EAGAIN != gf_error_to_errno (rsp.op_errno))) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (gf_error_to_errno (rsp.op_errno)));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (gf_error_to_errno (rsp.op_errno)),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (lk, frame, rsp.op_ret,
gf_error_to_errno (rsp.op_errno), &lock);
+ client_local_wipe (local);
return 0;
}
@@ -1879,8 +1895,10 @@ client3_1_readdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (gf_error_to_errno (rsp.op_errno)));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (gf_error_to_errno (rsp.op_errno)),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (readdir, frame, rsp.op_ret,
gf_error_to_errno (rsp.op_errno), &entries);
@@ -1935,8 +1953,10 @@ client3_1_readdirp_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (gf_error_to_errno (rsp.op_errno)));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (gf_error_to_errno (rsp.op_errno)),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (readdirp, frame, rsp.op_ret,
gf_error_to_errno (rsp.op_errno), &entries);
@@ -1997,7 +2017,7 @@ client3_1_rename_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
+ gf_log (this->name, GF_LOG_WARNING, "remote operation failed: %s",
strerror (gf_error_to_errno (rsp.op_errno)));
}
STACK_UNWIND_STRICT (rename, frame, rsp.op_ret,
@@ -2054,8 +2074,10 @@ client3_1_link_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
frame->local = NULL;
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (gf_error_to_errno (rsp.op_errno)));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (gf_error_to_errno (rsp.op_errno)),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (link, frame, rsp.op_ret,
gf_error_to_errno (rsp.op_errno), inode,
@@ -2130,8 +2152,10 @@ client3_1_opendir_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
frame->local = NULL;
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (gf_error_to_errno (rsp.op_errno)));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (gf_error_to_errno (rsp.op_errno)),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (opendir, frame, rsp.op_ret,
gf_error_to_errno (rsp.op_errno), fd);
@@ -2226,8 +2250,10 @@ out:
if (rsp.op_ret == -1) {
/* any error other than ENOENT */
if (rsp.op_errno != ENOENT)
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (rsp.op_errno));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (rsp.op_errno),
+ (local) ? local->loc.path : "--");
else
gf_log (this->name, GF_LOG_TRACE, "not found on remote node");
@@ -2300,16 +2326,16 @@ client3_1_readv_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
out:
if (rsp.op_ret == -1) {
- gf_log (this->name, GF_LOG_INFO, "remote operation failed: %s",
- strerror (gf_error_to_errno (rsp.op_errno)));
+ gf_log (this->name, GF_LOG_WARNING,
+ "remote operation failed: %s. Path: %s",
+ strerror (gf_error_to_errno (rsp.op_errno)),
+ (local) ? local->loc.path : "--");
}
STACK_UNWIND_STRICT (readv, frame, rsp.op_ret,
gf_error_to_errno (rsp.op_errno), vector, rspcount,
&stat, iobref);
- if (local) {
- client_local_wipe (local);
- }
+ client_local_wipe (local);
return 0;
}
@@ -2615,8 +2641,7 @@ unwind:
STACK_UNWIND_STRICT (lookup, frame, -1, op_errno, NULL, NULL, NULL,
NULL);
- if (local)
- client_local_wipe (local);
+ client_local_wipe (local);
if (req.dict.dict_val)
GF_FREE (req.dict.dict_val);
@@ -3015,8 +3040,7 @@ unwind:
STACK_UNWIND_STRICT (symlink, frame, -1, op_errno, NULL, NULL, NULL, NULL);
- if (local)
- client_local_wipe (local);
+ client_local_wipe (local);
if (req.dict.dict_val) {
GF_FREE (req.dict.dict_val);
}
@@ -3210,8 +3234,7 @@ unwind:
STACK_UNWIND_STRICT (mknod, frame, -1, op_errno, NULL, NULL, NULL, NULL);
- if (local)
- client_local_wipe (local);
+ client_local_wipe (local);
if (req.dict.dict_val) {
GF_FREE (req.dict.dict_val);
}
@@ -3291,8 +3314,7 @@ unwind:
STACK_UNWIND_STRICT (mkdir, frame, -1, op_errno, NULL, NULL, NULL, NULL);
- if (local)
- client_local_wipe (local);
+ client_local_wipe (local);
if (req.dict.dict_val) {
GF_FREE (req.dict.dict_val);
}
@@ -3374,8 +3396,7 @@ unwind:
STACK_UNWIND_STRICT (create, frame, -1, op_errno, NULL, NULL, NULL,
NULL, NULL);
- if (local)
- client_local_wipe (local);
+ client_local_wipe (local);
if (req.dict.dict_val) {
GF_FREE (req.dict.dict_val);
}
@@ -3441,8 +3462,7 @@ unwind:
STACK_UNWIND_STRICT (open, frame, -1, op_errno, NULL);
- if (local)
- client_local_wipe (local);
+ client_local_wipe (local);
return 0;
}
@@ -3758,8 +3778,7 @@ unwind:
if (frame)
frame->local = NULL;
STACK_UNWIND_STRICT (opendir, frame, -1, op_errno, NULL);
- if (local)
- client_local_wipe (local);
+ client_local_wipe (local);
return 0;
}