diff options
author | Anoop C S <anoopcs@redhat.com> | 2015-08-13 11:49:57 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-08-19 10:43:05 -0700 |
commit | d290dc62e474cfe4a305f503dff815c73d3f2578 (patch) | |
tree | 07f0b56f7a15f2359c21486c4d5dfd964d80c153 /xlators/protocol | |
parent | 963ce60e0d5edc418ae3cdc954fca350a5e3a131 (diff) |
protocol-client/server: Minor logging improvements for better debugging
Adding some log messages to protocol client and server to
ease the debugging process.
Change-Id: I84a05fcde7189d6e6ad5c37c1bbffb148d123517
BUG: 1227667
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-on: http://review.gluster.org/11903
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/client/src/client.c | 2 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-helpers.c | 8 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-messages.h | 11 |
3 files changed, 19 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index b8f467622d5..0de738b6e67 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -2020,6 +2020,8 @@ client_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event, break; } case RPC_CLNT_DISCONNECT: + gf_msg_debug (this->name, 0, "got RPC_CLNT_DISCONNECT"); + if (!conf->lk_heal) client_mark_fd_bad (this); else diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c index 7820e1ce907..0971e84298c 100644 --- a/xlators/protocol/server/src/server-helpers.c +++ b/xlators/protocol/server/src/server-helpers.c @@ -355,8 +355,11 @@ server_connection_cleanup (xlator_t *this, client_t *client, cd_ret = gf_client_disconnect (client); } - if (fdentries != NULL) + if (fdentries != NULL) { + gf_msg_debug (this->name, 0, "Performing cleanup on %d " + "fdentries", fd_count); ret = do_fd_cleanup (this, client, fdentries, fd_count); + } else gf_msg (this->name, GF_LOG_INFO, 0, PS_MSG_FDENTRY_NULL, "no fdentries to clean"); @@ -1058,6 +1061,9 @@ server_cancel_grace_timer (xlator_t *this, client_t *client) LOCK (&serv_ctx->fdtable_lock); { if (serv_ctx->grace_timer) { + gf_msg (this->name, GF_LOG_INFO, 0, + PS_MSG_GRACE_TIMER_CANCELLED, + "Cancelling the grace timer"); timer = serv_ctx->grace_timer; serv_ctx->grace_timer = NULL; } diff --git a/xlators/protocol/server/src/server-messages.h b/xlators/protocol/server/src/server-messages.h index 10db5f8adef..83c9a9039b9 100644 --- a/xlators/protocol/server/src/server-messages.h +++ b/xlators/protocol/server/src/server-messages.h @@ -40,7 +40,7 @@ */ #define GLFS_PS_BASE GLFS_MSGID_COMP_PS -#define GLFS_NUM_MESSAGES 82 +#define GLFS_NUM_MESSAGES 83 #define GLFS_MSGID_END (GLFS_PS_BASE + GLFS_NUM_MESSAGES + 1) /* Messages with message IDs */ #define glfs_msg_start_x GLFS_PS_BASE, "Invalid: Start of messages" @@ -784,6 +784,15 @@ * */ +#define PS_MSG_GRACE_TIMER_CANCELLED (GLFS_PS_BASE + 83) + +/*! + * @messageid + * @diagnosis + * @recommendedaction + * + */ + /*------------*/ #define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages" |