diff options
author | Mohamed Ashiq <ashiq333@gmail.com> | 2015-05-19 15:34:43 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-06-18 01:34:58 -0700 |
commit | d32b221747cf6742cffaff5a60e16269dffd04cc (patch) | |
tree | b440795763e7469024c95f2fe41d31946ae6b702 /libglusterfs/src/fd-lk.c | |
parent | daf22a3b59f42c897f345dab74c3852ddf9bddef (diff) |
fd,inode/libglusterfs : porting to a new logging framework
Change-Id: I4beba3b50456f802824374b6e3fa8079d72f2c00
BUG: 1194640
Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com>
Reviewed-on: http://review.gluster.org/10825
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'libglusterfs/src/fd-lk.c')
-rw-r--r-- | libglusterfs/src/fd-lk.c | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/libglusterfs/src/fd-lk.c b/libglusterfs/src/fd-lk.c index 3c1befea966..01c6c1a0157 100644 --- a/libglusterfs/src/fd-lk.c +++ b/libglusterfs/src/fd-lk.c @@ -10,7 +10,7 @@ #include "fd-lk.h" #include "common-utils.h" - +#include "libglusterfs-messages.h" int32_t _fd_lk_delete_lock (fd_lk_ctx_node_t *lock) @@ -89,8 +89,8 @@ fd_lk_ctx_t * _fd_lk_ctx_ref (fd_lk_ctx_t *lk_ctx) { if (!lk_ctx) { - gf_log_callingfn ("fd", GF_LOG_WARNING, - "invalid argument"); + gf_msg_callingfn ("fd-lk", GF_LOG_WARNING, EINVAL, + LG_MSG_INVALID_ARG, "invalid argument"); return NULL; } @@ -105,8 +105,8 @@ fd_lk_ctx_ref (fd_lk_ctx_t *lk_ctx) fd_lk_ctx_t *new_lk_ctx = NULL; if (!lk_ctx) { - gf_log_callingfn ("fd", GF_LOG_WARNING, - "invalid argument"); + gf_msg_callingfn ("fd-lk", GF_LOG_WARNING, EINVAL, + LG_MSG_INVALID_ARG, "invalid argument"); return NULL; } @@ -418,19 +418,18 @@ print_lock_list (fd_lk_ctx_t *lk_ctx) { fd_lk_ctx_node_t *lk = NULL; - gf_log ("fd-lk", GF_LOG_DEBUG, "lock list:"); + gf_msg_debug ("fd-lk", 0, "lock list:"); list_for_each_entry (lk, &lk_ctx->lk_list, next) - gf_log ("fd-lk", GF_LOG_DEBUG, "owner = %s, " - "cmd = %s fl_type = %s, fs_start = %"PRId64", " - "fs_end = %"PRId64", user_flock: l_type = %s, " - "l_start = %"PRId64", l_len = %"PRId64", ", - lkowner_utoa (&lk->user_flock.l_owner), - get_lk_cmd (lk->cmd), get_lk_type (lk->fl_type), - lk->fl_start, lk->fl_end, - get_lk_type (lk->user_flock.l_type), - lk->user_flock.l_start, - lk->user_flock.l_len); + gf_msg_debug ("fd-lk", 0, "owner = %s, cmd = %s fl_type = %s," + " fs_start = %"PRId64", fs_end = %"PRId64", " + "user_flock: l_type = %s, l_start = %"PRId64", " + "l_len = %"PRId64", ", + lkowner_utoa (&lk->user_flock.l_owner), + get_lk_cmd (lk->cmd), get_lk_type (lk->fl_type), + lk->fl_start, lk->fl_end, + get_lk_type (lk->user_flock.l_type), + lk->user_flock.l_start, lk->user_flock.l_len); } int @@ -447,15 +446,13 @@ fd_lk_insert_and_merge (fd_t *fd, int32_t cmd, lk_ctx = fd_lk_ctx_ref (fd->lk_ctx); lk = fd_lk_ctx_node_new (cmd, flock); - gf_log ("fd-lk", GF_LOG_DEBUG, - "new lock requrest: owner = %s, fl_type = %s, " - "fs_start = %"PRId64", fs_end = %"PRId64", " - "user_flock: l_type = %s, l_start = %"PRId64", " - "l_len = %"PRId64, lkowner_utoa (&flock->l_owner), - get_lk_type (lk->fl_type), lk->fl_start, - lk->fl_end, get_lk_type (lk->user_flock.l_type), - lk->user_flock.l_start, - lk->user_flock.l_len); + gf_msg_debug ("fd-lk", 0, "new lock requrest: owner = %s, fl_type = %s" + ", fs_start = %"PRId64", fs_end = %"PRId64", user_flock:" + " l_type = %s, l_start = %"PRId64", l_len = %"PRId64, + lkowner_utoa (&flock->l_owner), + get_lk_type (lk->fl_type), lk->fl_start, lk->fl_end, + get_lk_type (lk->user_flock.l_type), + lk->user_flock.l_start, lk->user_flock.l_len); LOCK (&lk_ctx->lock); { |