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
* 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;
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 */
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")))
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")))
* 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")))