summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-handshake.c
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-12-07 00:02:10 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-12-06 22:18:59 -0800
commitf783ecfbfd8c873d97644b8b6b0d95e3f878b992 (patch)
tree8a2d0efaa24baa8bc6f93c4b0412bbdbb77dea08 /xlators/protocol/client/src/client-handshake.c
parentfceef36419503f332ffd1fccdcb03da86cf9cdb3 (diff)
rpc-clnt: show disconnect messages in log file by default
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
Diffstat (limited to 'xlators/protocol/client/src/client-handshake.c')
-rw-r--r--xlators/protocol/client/src/client-handshake.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index c56294c83..8e5236fc1 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -397,9 +397,15 @@ client3_1_reopen_cbk (struct rpc_req *req, struct iovec *iov, int count,
goto out;
}
- gf_log (frame->this->name, GF_LOG_DEBUG,
- "reopen on %s returned %d (%"PRId64")",
- local->loc.path, rsp.op_ret, rsp.fd);
+ if (rsp.op_ret < 0) {
+ gf_log (frame->this->name, GF_LOG_NORMAL,
+ "reopen on %s failed (%s)",
+ local->loc.path, rsp.op_ret, strerror (rsp.op_errno));
+ } else {
+ gf_log (frame->this->name, GF_LOG_NORMAL,
+ "reopen on %s succeeded (%"PRId64")",
+ local->loc.path, rsp.op_ret, rsp.fd);
+ }
if (rsp.op_ret == -1)
goto out;
@@ -483,9 +489,15 @@ client3_1_reopendir_cbk (struct rpc_req *req, struct iovec *iov, int count,
goto out;
}
- gf_log (frame->this->name, GF_LOG_DEBUG,
- "reopendir on %s returned %d (%"PRId64")",
- local->loc.path, rsp.op_ret, rsp.fd);
+ if (rsp.op_ret < 0) {
+ gf_log (frame->this->name, GF_LOG_NORMAL,
+ "reopendir on %s failed (%s)",
+ local->loc.path, rsp.op_ret, strerror (rsp.op_errno));
+ } else {
+ gf_log (frame->this->name, GF_LOG_NORMAL,
+ "reopendir on %s succeeded (%"PRId64")",
+ local->loc.path, rsp.op_ret, rsp.fd);
+ }
if (-1 != rsp.op_ret) {
fdctx = local->fdctx;