summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2020-07-28 18:31:23 +0530
committerAmar Tumballi <amar@kadalu.io>2020-07-29 08:00:10 +0000
commitca7fda9068dbaf1a8083c673c8cbee29a49a50d5 (patch)
treeb3c58d63844274d43c4462831c077e28605bb84c /libglusterfs
parent74a195e475e893eb2ed0f814f88a1d726ad50114 (diff)
statedump: Dump xlator-name for mem-pool object
Fixes: #1399 Change-Id: I11cf75a0ea9a16724f36f73feb1c90dabed25c4b Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/glusterfs/mem-pool.h1
-rw-r--r--libglusterfs/src/mem-pool.c1
-rw-r--r--libglusterfs/src/statedump.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs/mem-pool.h b/libglusterfs/src/glusterfs/mem-pool.h
index 90fb8820c74..0fd1214e27d 100644
--- a/libglusterfs/src/glusterfs/mem-pool.h
+++ b/libglusterfs/src/glusterfs/mem-pool.h
@@ -209,6 +209,7 @@ struct mem_pool {
unsigned long sizeof_type;
unsigned long count; /* requested pool size (unused) */
char *name;
+ char *xl_name;
gf_atomic_t active; /* current allocations */
#ifdef DEBUG
gf_atomic_t hit; /* number of allocations served from pt_pool */
diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c
index 1c31c27d95b..1a87d277cc9 100644
--- a/libglusterfs/src/mem-pool.c
+++ b/libglusterfs/src/mem-pool.c
@@ -682,6 +682,7 @@ mem_pool_new_fn(glusterfs_ctx_t *ctx, unsigned long sizeof_type,
new->sizeof_type = sizeof_type;
new->count = count;
new->name = name;
+ new->xl_name = THIS->name;
new->pool = pool;
GF_ATOMIC_INIT(new->active, 0);
#ifdef DEBUG
diff --git a/libglusterfs/src/statedump.c b/libglusterfs/src/statedump.c
index 9eed0b2dc35..655317f3ef1 100644
--- a/libglusterfs/src/statedump.c
+++ b/libglusterfs/src/statedump.c
@@ -377,6 +377,7 @@ gf_proc_dump_mempool_info(glusterfs_ctx_t *ctx)
gf_proc_dump_write("-----", "-----");
gf_proc_dump_write("pool-name", "%s", pool->name);
+ gf_proc_dump_write("xlator-name", "%s", pool->xl_name);
gf_proc_dump_write("active-count", "%" GF_PRI_ATOMIC, active);
gf_proc_dump_write("sizeof-type", "%lu", pool->sizeof_type);
gf_proc_dump_write("padded-sizeof", "%d",