]> sourceware.org Git - lvm2.git/commitdiff
lv_manip: use vgmem pool
authorZdenek Kabelac <zkabelac@redhat.com>
Sat, 23 Jun 2018 09:59:35 +0000 (11:59 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 25 Jun 2018 13:07:55 +0000 (15:07 +0200)
Switch to vgmem pool for allocation associated with modification
of particular VG.

lib/metadata/lv_manip.c

index 11a6927c07ba49c552390f8873681e710331c9bd..7b683137e003e96447273c1249fec56e9a6554d9 100644 (file)
@@ -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;
                        }
This page took 0.043831 seconds and 5 git commands to generate.