diff --git a/libdm/mm/pool-fast.c b/libdm/mm/pool-fast.c index ebd982e6d..377ad99ca 100644 --- a/libdm/mm/pool-fast.c +++ b/libdm/mm/pool-fast.c @@ -28,6 +28,7 @@ struct dm_pool { struct dm_list list; struct chunk *chunk, *spare_chunk; /* spare_chunk is a one entry free list to stop 'bobbling' */ + const char *name; size_t chunk_size; size_t object_len; unsigned object_alignment; @@ -51,6 +52,7 @@ struct dm_pool *dm_pool_create(const char *name, size_t chunk_hint) return 0; } + p->name = name; /* round chunk_hint up to the next power of 2 */ p->chunk_size = chunk_hint + sizeof(struct chunk); while (new_size < p->chunk_size) diff --git a/libdm/mm/pool.c b/libdm/mm/pool.c index 35bfffae4..825f7cad8 100644 --- a/libdm/mm/pool.c +++ b/libdm/mm/pool.c @@ -71,7 +71,7 @@ void dm_pools_check_leaks(void) p->orig_pool, p->name, p->stats.bytes); #else - log_error(" [%p]", p); + log_error(" [%p] %s", p, p->name); #endif } }