rpc: Showing some unusual timer error logs during brick stop

Solution: Update msg condition in gf_timer_call_after function
          to avoid the message

BUG: 1538427
Change-Id: I849e8e052a8259cf977fd5e7ff3aeba52f9b5f27
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
This commit is contained in:
Mohit Agrawal 2018-01-25 10:03:09 +05:30 committed by Raghavendra G
parent 016165c411
commit c142d26e44

View File

@ -30,10 +30,11 @@ gf_timer_call_after (glusterfs_ctx_t *ctx,
gf_timer_t *trav = NULL;
uint64_t at = 0;
if (ctx == NULL)
if ((ctx == NULL) || (ctx->cleanup_started))
{
gf_msg_callingfn ("timer", GF_LOG_ERROR, EINVAL,
LG_MSG_INVALID_ARG, "invalid argument");
LG_MSG_INVALID_ARG, "Either ctx is NULL or"
" ctx cleanup started");
return NULL;
}
@ -224,19 +225,6 @@ gf_timer_registry_init (glusterfs_ctx_t *ctx)
gf_timer_registry_t *reg = NULL;
int ret = -1;
if (ctx == NULL) {
gf_msg_callingfn ("timer", GF_LOG_ERROR, EINVAL,
LG_MSG_INVALID_ARG, "invalid argument");
return NULL;
}
if (ctx->cleanup_started) {
gf_msg_callingfn ("timer", GF_LOG_INFO, 0,
LG_MSG_CTX_CLEANUP_STARTED,
"ctx cleanup started");
return NULL;
}
LOCK (&ctx->lock);
{
reg = ctx->timer;