diff options
author | Mohit Agrawal <moagrawa@redhat.com> | 2018-01-25 10:03:09 +0530 |
---|---|---|
committer | jiffin tony Thottan <jthottan@redhat.com> | 2018-02-12 10:11:27 +0000 |
commit | fa0e690f9c8cf46fb01b386b543339d68c102b6a (patch) | |
tree | 7b5666c2dc4ba3ac1e3bd1cff38a5ccc4ba4026f | |
parent | 1818a3eb5225da5edaa362ddf56474ea72e5091a (diff) |
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>
> (cherry picked from commit c142d26e44436d805e476f2d13ac8726052a59c4)
BUG: 1542934
Change-Id: I849e8e052a8259cf977fd5e7ff3aeba52f9b5f27
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
-rw-r--r-- | libglusterfs/src/timer.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/libglusterfs/src/timer.c b/libglusterfs/src/timer.c index 3d69a9f7160..34dfd353bc8 100644 --- a/libglusterfs/src/timer.c +++ b/libglusterfs/src/timer.c @@ -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; } @@ -186,19 +187,6 @@ gf_timer_registry_init (glusterfs_ctx_t *ctx) { gf_timer_registry_t *reg = NULL; - 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; |