]> sourceware.org Git - lvm2.git/commitdiff
Remove and unneeded parameter from build_parallel_areas_from_lv()
authorJonathan Earl Brassow <jbrassow@redhat.com>
Tue, 19 Jul 2011 16:37:42 +0000 (16:37 +0000)
committerJonathan Earl Brassow <jbrassow@redhat.com>
Tue, 19 Jul 2011 16:37:42 +0000 (16:37 +0000)
lib/metadata/lv_alloc.h
lib/metadata/lv_manip.c
lib/metadata/mirror.c

index 785a957ec6c768330d4d01cd9ea715356623465c..22b7ebcd41869a09fe1574621c820a86e27409dd 100644 (file)
@@ -76,8 +76,7 @@ int lv_add_virtual_segment(struct logical_volume *lv, uint64_t status,
 
 void alloc_destroy(struct alloc_handle *ah);
 
-struct dm_list *build_parallel_areas_from_lv(struct cmd_context *cmd,
-                                            struct logical_volume *lv,
+struct dm_list *build_parallel_areas_from_lv(struct logical_volume *lv,
                                             unsigned use_pvmove_parent_lv);
 
 #endif
index ccbb08fec667c9da57ab8fe3ad92bf150b1cac6a..c2b50ded35cf2c1db3e01fe7e4927fa0161224a8 100644 (file)
@@ -2575,10 +2575,10 @@ static int _add_pvs(struct cmd_context *cmd, struct pv_segment *peg,
  * Construct dm_list of segments of LVs showing which PVs they use.
  * For pvmove we use the *parent* LV so we can pick up stripes & existing mirrors etc.
  */
-struct dm_list *build_parallel_areas_from_lv(struct cmd_context *cmd,
-                                            struct logical_volume *lv,
+struct dm_list *build_parallel_areas_from_lv(struct logical_volume *lv,
                                             unsigned use_pvmove_parent_lv)
 {
+       struct cmd_context *cmd = lv->vg->cmd;
        struct dm_list *parallel_areas;
        struct seg_pvs *spvs;
        uint32_t current_le = 0;
@@ -2866,7 +2866,7 @@ int split_parent_segments_for_layer(struct cmd_context *cmd,
        uint32_t s;
        struct dm_list *parallel_areas;
 
-       if (!(parallel_areas = build_parallel_areas_from_lv(cmd, layer_lv, 0)))
+       if (!(parallel_areas = build_parallel_areas_from_lv(layer_lv, 0)))
                return_0;
 
        /* Loop through all LVs except itself */
index ba89cdd8617fb05f9b0f132b63faac1d08f2e50d..aa31d463ddb64caf8f4ec0b20fe088161e661a61 100644 (file)
@@ -1624,7 +1624,7 @@ int add_mirrors_to_segments(struct cmd_context *cmd, struct logical_volume *lv,
        uint32_t adjusted_region_size;
        int r = 1;
 
-       if (!(parallel_areas = build_parallel_areas_from_lv(cmd, lv, 1)))
+       if (!(parallel_areas = build_parallel_areas_from_lv(lv, 1)))
                return_0;
 
        if (!(segtype = get_segtype_from_string(cmd, "mirror")))
@@ -1876,7 +1876,7 @@ int add_mirror_log(struct cmd_context *cmd, struct logical_volume *lv,
                return 1;
        }
 
-       if (!(parallel_areas = build_parallel_areas_from_lv(cmd, lv, 0)))
+       if (!(parallel_areas = build_parallel_areas_from_lv(lv, 0)))
                return_0;
 
        if (!(segtype = get_segtype_from_string(cmd, "mirror")))
@@ -1948,7 +1948,7 @@ int add_mirror_images(struct cmd_context *cmd, struct logical_volume *lv,
         * allocate destination extents
         */
 
-       if (!(parallel_areas = build_parallel_areas_from_lv(cmd, lv, 0)))
+       if (!(parallel_areas = build_parallel_areas_from_lv(lv, 0)))
                return_0;
 
        if (!(segtype = get_segtype_from_string(cmd, "mirror")))
This page took 0.047415 seconds and 5 git commands to generate.