diff options
author | Amar Tumballi <amar@gluster.com> | 2011-03-16 09:38:49 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-03-17 23:11:04 -0700 |
commit | 0a1f00cdcb087e00c184c62c1a9f22803c257cf2 (patch) | |
tree | 85b3ae636ec6084ec46a883ca7e090575eb60fba /libglusterfs/src/globals.c | |
parent | 0f39192ef6bc7b1c74cfaeb04ed21305996d67e9 (diff) |
libglusterfs/src/*.c: log enhancement
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 2346 (Log message enhancements in GlusterFS - phase 1)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
Diffstat (limited to 'libglusterfs/src/globals.c')
-rw-r--r-- | libglusterfs/src/globals.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libglusterfs/src/globals.c b/libglusterfs/src/globals.c index 90e4bc41336..fe0b92dda9e 100644 --- a/libglusterfs/src/globals.c +++ b/libglusterfs/src/globals.c @@ -99,8 +99,10 @@ glusterfs_ctx_init () { int ret = 0; - if (glusterfs_ctx) + if (glusterfs_ctx) { + gf_log_callingfn ("", GF_LOG_WARNING, "init called again"); goto out; + } glusterfs_ctx = CALLOC (1, sizeof (*glusterfs_ctx)); if (!glusterfs_ctx) { @@ -144,6 +146,7 @@ glusterfs_this_init () ret = pthread_key_create (&this_xlator_key, glusterfs_this_destroy); if (ret != 0) { + gf_log ("", GF_LOG_WARNING, "failed to create the pthread key"); return ret; } @@ -170,6 +173,8 @@ __glusterfs_this_location () ret = pthread_setspecific (this_xlator_key, this_location); if (ret != 0) { + gf_log ("", GF_LOG_WARNING, "pthread setspecific failed"); + FREE (this_location); this_location = NULL; goto out; |