summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/statedump.c
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2017-08-29 00:16:22 +0200
committerJeff Darcy <jeff@pl.atyp.us>2017-08-29 12:37:40 +0000
commitea8c9af0b4a91ef927bbeee9afdfa7d1cea6369f (patch)
tree7f336db98172f277dbefcd929a8a3948ade86e82 /libglusterfs/src/statedump.c
parent83990996736c72f3131f66df35ea7bf2b3d3b5fa (diff)
mem-pool: track glusterfs_ctx_t in struct mem_pool
In order to generate statedumps per glusterfs_ctx_t, it is needed to place all the memory pools in a structure that the context can reach. The 'struct mem_pool' has been extended with a 'list_head owner' that is linked with the glusterfs_ctx_t->mempool_list. All callers of mem_pool_new() have been updated to pass the current glusterfs_ctx_t along. This context is needed to add the new memory pool to the list and for grabbing the ctx->lock while updating the glusterfs_ctx_t->mempool_list. Updates: #307 Change-Id: Ia9384424d8d1630ef3efc9d5d523bf739c356c6e Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/18075 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'libglusterfs/src/statedump.c')
-rw-r--r--libglusterfs/src/statedump.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/libglusterfs/src/statedump.c b/libglusterfs/src/statedump.c
index a2000b158e6..67c46998d63 100644
--- a/libglusterfs/src/statedump.c
+++ b/libglusterfs/src/statedump.c
@@ -399,14 +399,10 @@ gf_proc_dump_mempool_info (glusterfs_ctx_t *ctx)
LOCK (&ctx->lock);
{
list_for_each_entry (pool, &ctx->mempool_list, owner) {
- int64_t active = GF_ATOMIC_GET (pool->active);
-
gf_proc_dump_write ("-----", "-----");
gf_proc_dump_write ("pool-name", "%s", pool->name);
- gf_proc_dump_write ("active-count", "%"GF_PRI_ATOMIC, active);
gf_proc_dump_write ("sizeof-type", "%d", pool->sizeof_type);
gf_proc_dump_write ("padded-sizeof", "%lu", 1 << pool->pool->power_of_two);
- gf_proc_dump_write ("size", "%lu", (1 << pool->pool->power_of_two) * active);
gf_proc_dump_write ("shared-pool", "%p", pool->pool);
}
}