diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h index 55eb71cbd..8c7bd4583 100644 --- a/lib/metadata/metadata-exported.h +++ b/lib/metadata/metadata-exported.h @@ -980,6 +980,7 @@ struct vdo_convert_params { struct dm_vdo_target_params vdo_params; /* VDO parameters for vdoformat */ const char *lv_name; uint32_t virtual_extents; + uint64_t header_size; activation_change_t activate; int do_zero; int do_wipe_signatures; /* Used for wiping VDO backend volume */ diff --git a/lib/metadata/vdo_manip.c b/lib/metadata/vdo_manip.c index 32568fae7..c8eebe55a 100644 --- a/lib/metadata/vdo_manip.c +++ b/lib/metadata/vdo_manip.c @@ -521,7 +521,7 @@ struct logical_volume *convert_vdo_lv(struct logical_volume *lv, } } - if (!convert_vdo_pool_lv(lv, &vcp->vdo_params, &lv->le_count, 1, 0)) + if (!convert_vdo_pool_lv(lv, &vcp->vdo_params, &lvc.virtual_extents, vcp->do_zero, vcp->header_size)) return_NULL; /* Create VDO LV with the name, we just release above */ diff --git a/tools/lvconvert.c b/tools/lvconvert.c index e50fa666d..52da38319 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -5479,7 +5479,6 @@ static int _lvconvert_to_vdopool_single(struct cmd_context *cmd, struct volume_group *vg = lv->vg; struct logical_volume *vdo_lv; const char *vg_name = NULL; - uint64_t vdo_pool_header_size; struct vdo_convert_params vcp = { .activate = CHANGE_AEY, .lv_name = arg_str_value(cmd, name_ARG, NULL), @@ -5498,7 +5497,7 @@ static int _lvconvert_to_vdopool_single(struct cmd_context *cmd, } else vcp.lv_name = "lvol%d"; - if (!fill_vdo_target_params(cmd, &vcp.vdo_params, &vdo_pool_header_size, vg->profile)) + if (!fill_vdo_target_params(cmd, &vcp.vdo_params, &vcp.header_size, vg->profile)) goto_out; if (!get_vdo_settings(cmd, &vcp.vdo_params, NULL))