1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

lvconvert: improve support for metadata profiles

lvconvert can use thin-profile just like lvcreate.
(Added already upstream as part of VDO support).
This commit is contained in:
Zdenek Kabelac 2021-02-23 23:22:18 +01:00
parent e2b693fbe6
commit f3babcb591
2 changed files with 4 additions and 0 deletions

View File

@ -7019,6 +7019,9 @@ struct logical_volume *insert_layer_for_lv(struct cmd_context *cmd,
lv_where->le_count = layer_lv->le_count;
lv_where->size = (uint64_t) lv_where->le_count * lv_where->vg->extent_size;
if (lv_where->vg->fid->fmt->features & FMT_CONFIG_PROFILE)
lv_where->profile = lv_where->vg->cmd->profile_params->global_metadata_profile;
/*
* recuresively rename sub LVs
* currently supported only for thin data layer

View File

@ -2573,6 +2573,7 @@ static int _prepare_profiles(struct cmd_context *cmd)
* The --commandprofile is assumed otherwise.
*/
if (!strcmp(cmd->command->name, "lvcreate") ||
!strcmp(cmd->command->name, "lvconvert") ||
!strcmp(cmd->command->name, "vgcreate") ||
!strcmp(cmd->command->name, "lvchange") ||
!strcmp(cmd->command->name, "vgchange")) {