From cea88a9e4ee5a2aa28b52d673fba66327e88ff6e Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sat, 23 Jun 2018 11:59:35 +0200 Subject: [PATCH] lv_manip: use vgmem pool Switch to vgmem pool for allocation associated with modification of particular VG. --- lib/metadata/lv_manip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 11a6927c0..7b683137e 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -5901,7 +5901,7 @@ struct dm_list *build_parallel_areas_from_lv(struct logical_volume *lv, uint32_t raid_multiple; struct lv_segment *seg = first_seg(lv); - if (!(parallel_areas = dm_pool_alloc(cmd->mem, sizeof(*parallel_areas)))) { + if (!(parallel_areas = dm_pool_alloc(lv->vg->vgmem, sizeof(*parallel_areas)))) { log_error("parallel_areas allocation failed"); return NULL; } @@ -5910,7 +5910,7 @@ struct dm_list *build_parallel_areas_from_lv(struct logical_volume *lv, do { if (!spvs || !create_single_list) { - if (!(spvs = dm_pool_zalloc(cmd->mem, sizeof(*spvs)))) { + if (!(spvs = dm_pool_zalloc(lv->vg->vgmem, sizeof(*spvs)))) { log_error("allocation failed"); return NULL; }