summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
authorAnoop C S <anoopcs@redhat.com>2015-07-16 13:56:51 +0530
committerAtin Mukherjee <amukherj@redhat.com>2015-07-24 04:19:30 -0700
commitc12234ee25deafe148a1557c30a0e56688548f91 (patch)
treef842c849836d4ef06bba858a37fa768a992b5155 /cli/src
parentd8e3fedf2a2c41ad0ec468ce44ef03a558abfe4a (diff)
cli: Create missing logbuf_pool
Backport of http://review.gluster.org/#/c/11691/ Since logbuf_pool was not created via glusterfs_ctx_defaults_init(), the following error was present in cli logs repeateadly for each and every execution of a gluster command. E [mem-pool.c:417:mem_get0] (-->/usr/local/lib/libglusterfs.so.0(+0x7e262) [0x7fdbc0b1f262] -->/usr/local/lib/libglusterfs.so.0(_gf_msg+0x804) [0x7fdbc0ac7844] -->/usr/local/lib/libglusterfs.so.0(mem_get0+0x78) [0x7fdbc0af5b48] ) 0-mem-pool: invalid argument [Invalid argument] This change creates ctx->logbuf_pool via glusterfs_ctx_defaults_init() in cli.c so that the above error is no longer logged in cli logs. Change-Id: I3fcd9cfefa06ddd52e1989b039ff5637372c3235 BUG: 1244103 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: http://review.gluster.org/11705 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 525ec4bab72..531b016087b 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -151,6 +151,10 @@ glusterfs_ctx_defaults_init (glusterfs_ctx_t *ctx)
if (!ctx->dict_data_pool)
return -1;
+ ctx->logbuf_pool = mem_pool_new (log_buf_t, 256);
+ if (!ctx->logbuf_pool)
+ return -1;
+
INIT_LIST_HEAD (&pool->all_frames);
LOCK_INIT (&pool->lock);
ctx->pool = pool;