diff options
author | Amar Tumballi <amar@gluster.com> | 2011-06-16 06:43:12 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-06-16 22:02:13 -0700 |
commit | 0101eb0b6444dc22860d8fdc82170aefa87ff0b3 (patch) | |
tree | 83031b823600d1f905d36a15d26b427585c00cc1 /xlators/protocol | |
parent | 25e8700721a71128c9f6143dc2effcdbcee692fc (diff) |
logging: fill proper domain names at places where it is missing
also changed some error messages where it was not explicit
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2346 (Log message enhancements in GlusterFS - phase 1)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/client/src/client-handshake.c | 25 | ||||
-rw-r--r-- | xlators/protocol/client/src/client3_1-fops.c | 80 |
2 files changed, 54 insertions, 51 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index 9c90b6bce..391d5516f 100644 --- a/xlators/protocol/client/src/client-handshake.c +++ b/xlators/protocol/client/src/client-handshake.c @@ -56,7 +56,7 @@ rpc_client_ping_timer_expired (void *data) this = data; if (!this || !this->private) { - gf_log ("", GF_LOG_WARNING, "xlator initialization not done"); + gf_log (THIS->name, GF_LOG_WARNING, "xlator initialization not done"); goto out; } @@ -140,7 +140,7 @@ client_start_ping (void *data) this = data; if (!this || !this->private) { - gf_log ("", GF_LOG_WARNING, "xlator not initialized"); + gf_log (THIS->name, GF_LOG_WARNING, "xlator not initialized"); goto fail; } @@ -218,7 +218,8 @@ client_start_ping (void *data) return; fail: - gf_log ("", GF_LOG_ERROR, "failed to start ping timer"); + gf_log (THIS->name, GF_LOG_ERROR, + "failed to start ping timer"); if (frame) { STACK_DESTROY (frame->root); @@ -239,13 +240,13 @@ client_ping_cbk (struct rpc_req *req, struct iovec *iov, int count, clnt_conf_t *conf = NULL; if (!myframe) { - gf_log ("", GF_LOG_WARNING, "frame with the request is NULL"); + gf_log (THIS->name, GF_LOG_WARNING, "frame with the request is NULL"); goto out; } frame = myframe; this = frame->this; if (!this || !this->private) { - gf_log ("", GF_LOG_WARNING, "xlator private is not set"); + gf_log (THIS->name, GF_LOG_WARNING, "xlator private is not set"); goto out; } @@ -301,7 +302,7 @@ client3_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count, frame = myframe; if (!frame || !frame->this) { - gf_log ("", GF_LOG_ERROR, "frame not found with the request, " + gf_log (THIS->name, GF_LOG_ERROR, "frame not found with the request, " "returning EINVAL"); rsp.op_ret = -1; rsp.op_errno = EINVAL; @@ -639,7 +640,8 @@ protocol_client_reopendir (xlator_t *this, clnt_fd_ctx_t *fdctx) return ret; out: - gf_log ("", GF_LOG_ERROR, "failed to send the re-opendir request"); + gf_log (THIS->name, GF_LOG_ERROR, + "failed to send the re-opendir request"); if (frame) { frame->local = NULL; @@ -719,7 +721,8 @@ protocol_client_reopen (xlator_t *this, clnt_fd_ctx_t *fdctx) return ret; out: - gf_log ("", GF_LOG_ERROR, "failed to send the re-open request"); + gf_log (THIS->name, GF_LOG_ERROR, + "failed to send the re-open request"); if (frame) { frame->local = NULL; @@ -1054,7 +1057,7 @@ select_server_supported_programs (xlator_t *this, gf_prog_detail *prog) int ret = -1; if (!this || !prog) { - gf_log ("", GF_LOG_WARNING, + gf_log (THIS->name, GF_LOG_WARNING, "xlator not found OR RPC program not found"); goto out; } @@ -1093,7 +1096,7 @@ server_has_portmap (xlator_t *this, gf_prog_detail *prog) int ret = -1; if (!this || !prog) { - gf_log ("", GF_LOG_WARNING, + gf_log (THIS->name, GF_LOG_WARNING, "xlator not found OR RPC program not found"); goto out; } @@ -1128,7 +1131,7 @@ client_query_portmap_cbk (struct rpc_req *req, struct iovec *iov, int count, voi frame = myframe; if (!frame || !frame->this || !frame->this->private) { - gf_log ("", GF_LOG_WARNING, + gf_log (THIS->name, GF_LOG_WARNING, "frame not found with rpc request"); goto out; } diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index e6d7e60c2..4790c790b 100644 --- a/xlators/protocol/client/src/client3_1-fops.c +++ b/xlators/protocol/client/src/client3_1-fops.c @@ -153,7 +153,7 @@ client3_1_symlink_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_symlink_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -212,7 +212,7 @@ client3_1_mknod_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_mknod_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -270,7 +270,7 @@ client3_1_mkdir_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_mkdir_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -327,7 +327,7 @@ client3_1_open_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_open_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -395,7 +395,7 @@ client3_1_stat_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_stat_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -437,7 +437,7 @@ client3_1_readlink_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_readlink_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -485,7 +485,7 @@ client3_1_unlink_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_unlink_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -530,7 +530,7 @@ client3_1_rmdir_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_rmdir_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -576,7 +576,7 @@ client3_1_truncate_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_truncate_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -621,7 +621,7 @@ client3_1_statfs_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_statfs_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -666,7 +666,7 @@ client3_1_writev_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_truncate_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -710,7 +710,7 @@ client3_1_flush_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_common_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -762,7 +762,7 @@ client3_1_fsync_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_truncate_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -806,7 +806,7 @@ client3_1_setxattr_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_common_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -852,7 +852,7 @@ client3_1_getxattr_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_getxattr_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); op_ret = -1; op_errno = EINVAL; goto out; @@ -937,7 +937,7 @@ client3_1_fgetxattr_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_fgetxattr_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); op_ret = -1; op_errno = EINVAL; goto out; @@ -1013,7 +1013,7 @@ client3_1_removexattr_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_common_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1050,7 +1050,7 @@ client3_1_fsyncdir_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_common_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1087,7 +1087,7 @@ client3_1_access_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_common_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1127,7 +1127,7 @@ client3_1_ftruncate_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_ftruncate_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1171,7 +1171,7 @@ client3_1_fstat_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_fstat_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1213,7 +1213,7 @@ client3_1_inodelk_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_common_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1251,7 +1251,7 @@ client3_1_finodelk_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_common_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1289,7 +1289,7 @@ client3_1_entrylk_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_common_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1328,7 +1328,7 @@ client3_1_fentrylk_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_common_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1374,7 +1374,7 @@ client3_1_xattrop_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_xattrop_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); op_ret = -1; op_errno = EINVAL; goto out; @@ -1463,7 +1463,7 @@ client3_1_fxattrop_cbk (struct rpc_req *req, struct iovec *iov, int count, if (ret < 0) { op_ret = -1; op_errno = EINVAL; - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); goto out; } op_errno = rsp.op_errno; @@ -1537,7 +1537,7 @@ client3_1_fsetxattr_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_common_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1576,7 +1576,7 @@ client3_1_fsetattr_cbk (struct rpc_req *req, struct iovec *iov, int count, } ret = xdr_to_fsetattr_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1623,7 +1623,7 @@ client3_1_setattr_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_setattr_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1679,7 +1679,7 @@ client3_1_create_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_create_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1751,7 +1751,7 @@ client3_1_rchecksum_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_rchecksum_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1800,7 +1800,7 @@ client3_1_lk_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_lk_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1864,7 +1864,7 @@ client3_1_readdir_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_readdir_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1920,7 +1920,7 @@ client3_1_readdirp_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_readdirp_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -1977,7 +1977,7 @@ client3_1_rename_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_rename_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -2036,7 +2036,7 @@ client3_1_link_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_link_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -2094,7 +2094,7 @@ client3_1_opendir_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_opendir_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -2171,7 +2171,7 @@ client3_1_lookup_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_lookup_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; op_errno = EINVAL; goto out; @@ -2281,7 +2281,7 @@ client3_1_readv_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_readv_rsp (*iov, &rsp); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "error"); + gf_log (this->name, GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; |