summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/mem-pool.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-03-15 16:04:10 +0530
committerAnand Avati <avati@redhat.com>2012-03-18 00:02:57 -0700
commit7cc412c7a2d2e4a6c7709b84bed75c10e5476244 (patch)
tree47dd4f6275d7b161a67cba600fc2e8b6cc56827a /libglusterfs/src/mem-pool.c
parente3a3912f890a73a13020acba86394125bb501b95 (diff)
mem-pool: more debug friendly logs by using gf_log_callingfn()
Change-Id: I4d6e53ad8660314315f2ff3aa92ffbe707d6efe9 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 803638 Reviewed-on: http://review.gluster.com/2951 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src/mem-pool.c')
-rw-r--r--libglusterfs/src/mem-pool.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c
index 7f20d6d4b36..3264163e1d2 100644
--- a/libglusterfs/src/mem-pool.c
+++ b/libglusterfs/src/mem-pool.c
@@ -331,7 +331,7 @@ mem_pool_new_fn (unsigned long sizeof_type,
glusterfs_ctx_t *ctx = NULL;
if (!sizeof_type || !count) {
- gf_log ("mem-pool", GF_LOG_ERROR, "invalid argument");
+ gf_log_callingfn ("mem-pool", GF_LOG_ERROR, "invalid argument");
return NULL;
}
padded_sizeof_type = sizeof_type + GF_MEM_POOL_PAD_BOUNDARY;
@@ -484,7 +484,7 @@ static int
__is_member (struct mem_pool *pool, void *ptr)
{
if (!pool || !ptr) {
- gf_log ("mem-pool", GF_LOG_ERROR, "invalid argument");
+ gf_log_callingfn ("mem-pool", GF_LOG_ERROR, "invalid argument");
return -1;
}
@@ -516,13 +516,15 @@ mem_put (void *ptr)
list = head = mem_pool_ptr2chunkhead (ptr);
tmp = mem_pool_from_ptr (head);
if (!tmp) {
- gf_log ("mem-pool", GF_LOG_ERROR, "ptr header is corrupted");
+ gf_log_callingfn ("mem-pool", GF_LOG_ERROR,
+ "ptr header is corrupted");
return;
}
pool = *tmp;
if (!pool) {
- gf_log ("mem-pool", GF_LOG_ERROR, "mem-pool ptr is NULL");
+ gf_log_callingfn ("mem-pool", GF_LOG_ERROR,
+ "mem-pool ptr is NULL");
return;
}
LOCK (&pool->lock);