From 9281d69a74ac9291843081a7cb4dd80ef2ef57d8 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 28 Jun 2021 18:12:19 +0200 Subject: [PATCH] lvconvert: fix vdo virtual size when specified Correctly use virtual size specified by: lvconvert --type vdo-pool --virtualsize (cherry picked from commit 6e773bb196d7e45fbecf0619f8993e6cf4534fa2) --- lib/metadata/vdo_manip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/metadata/vdo_manip.c b/lib/metadata/vdo_manip.c index 7d5a2cb5a..afc513ae5 100644 --- a/lib/metadata/vdo_manip.c +++ b/lib/metadata/vdo_manip.c @@ -393,7 +393,8 @@ struct logical_volume *convert_vdo_pool_lv(struct logical_volume *data_lv, } else { log_verbose("Skiping VDO formating %s.", display_lvname(data_lv)); /* TODO: parse existing VDO data and retrieve vdo_logical_size */ - vdo_logical_size = data_lv->size; + if (!*virtual_extents) + vdo_logical_size = data_lv->size; } if (!deactivate_lv(data_lv->vg->cmd, data_lv)) {