From abc2a6b0b91a82bb59327cd2a4ca72b8954e1425 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 16 Mar 2011 09:39:21 +0000 Subject: glusterfsd: log enhancement Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346 --- glusterfsd/src/glusterfsd-mgmt.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'glusterfsd/src/glusterfsd-mgmt.c') diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index 86bd482f7e0..77b18e9723c 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -425,6 +425,7 @@ mgmt_submit_request (void *req, call_frame_t *frame, if (req && sfunc) { ret = sfunc (iov, req); if (ret == -1) { + gf_log ("", GF_LOG_WARNING, "failed to create XDR payload"); goto out; } iov.iov_len = ret; @@ -617,7 +618,7 @@ mgmt_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_getspec_rsp (*iov, &rsp); if (ret < 0) { - gf_log (frame->this->name, GF_LOG_ERROR, "error"); + gf_log (frame->this->name, GF_LOG_ERROR, "XDR decoding error"); ret = -1; goto out; } @@ -872,16 +873,21 @@ glusterfs_mgmt_init (glusterfs_ctx_t *ctx) rpc = rpc_clnt_new (options, THIS->ctx, THIS->name); if (!rpc) { ret = -1; + gf_log ("", GF_LOG_WARNING, "failed to create rpc clnt"); goto out; } ret = rpc_clnt_register_notify (rpc, mgmt_rpc_notify, THIS); - if (ret) + if (ret) { + gf_log ("", GF_LOG_WARNING, "failed to register notify function"); goto out; + } ret = rpcclnt_cbk_program_register (rpc, &mgmt_cbk_prog); - if (ret) + if (ret) { + gf_log ("", GF_LOG_WARNING, "failed to register callback function"); goto out; + } ret = rpc_clnt_start (rpc); if (ret) @@ -910,7 +916,7 @@ mgmt_pmap_signin_cbk (struct rpc_req *req, struct iovec *iov, int count, ret = xdr_to_pmap_signin_rsp (*iov, &rsp); if (ret < 0) { - gf_log (frame->this->name, GF_LOG_ERROR, "error"); + gf_log (frame->this->name, GF_LOG_ERROR, "XDR decode error"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; @@ -976,7 +982,7 @@ mgmt_pmap_signout_cbk (struct rpc_req *req, struct iovec *iov, int count, ctx = glusterfs_ctx_get (); ret = xdr_to_pmap_signout_rsp (*iov, &rsp); if (ret < 0) { - gf_log ("", GF_LOG_ERROR, "error"); + gf_log ("", GF_LOG_ERROR, "XDR decoding failed"); rsp.op_ret = -1; rsp.op_errno = EINVAL; goto out; -- cgit