1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Keep pool name also for pool-fast

It's cheap to keep this name - and it is useful for 'non pool debug code'
compilation.
This commit is contained in:
Zdenek Kabelac 2011-03-10 14:49:01 +00:00
parent 1092ae2dbe
commit 36b9ec636d
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -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
}
}