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:
parent
1092ae2dbe
commit
36b9ec636d
@ -28,6 +28,7 @@ struct dm_pool {
|
|||||||
struct dm_list list;
|
struct dm_list list;
|
||||||
struct chunk *chunk, *spare_chunk; /* spare_chunk is a one entry free
|
struct chunk *chunk, *spare_chunk; /* spare_chunk is a one entry free
|
||||||
list to stop 'bobbling' */
|
list to stop 'bobbling' */
|
||||||
|
const char *name;
|
||||||
size_t chunk_size;
|
size_t chunk_size;
|
||||||
size_t object_len;
|
size_t object_len;
|
||||||
unsigned object_alignment;
|
unsigned object_alignment;
|
||||||
@ -51,6 +52,7 @@ struct dm_pool *dm_pool_create(const char *name, size_t chunk_hint)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p->name = name;
|
||||||
/* round chunk_hint up to the next power of 2 */
|
/* round chunk_hint up to the next power of 2 */
|
||||||
p->chunk_size = chunk_hint + sizeof(struct chunk);
|
p->chunk_size = chunk_hint + sizeof(struct chunk);
|
||||||
while (new_size < p->chunk_size)
|
while (new_size < p->chunk_size)
|
||||||
|
@ -71,7 +71,7 @@ void dm_pools_check_leaks(void)
|
|||||||
p->orig_pool,
|
p->orig_pool,
|
||||||
p->name, p->stats.bytes);
|
p->name, p->stats.bytes);
|
||||||
#else
|
#else
|
||||||
log_error(" [%p]", p);
|
log_error(" [%p] %s", p, p->name);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user