From 4b7a57c9ed5187e32394a983e08be3b4a0b19079 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 3 Jul 2018 20:14:48 +0200 Subject: [PATCH] vdo: with created names use vpool When user create vdo-pool - use different automatic name. So unlike with traditional LVs using lvol0, lvol1 use vpool0, vpool1... TODO: apply similar for thin-pool & cache-pool... --- lib/metadata/lv_manip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index b731c2afe..2dfe994e0 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -8125,8 +8125,8 @@ struct logical_volume *lv_create_single(struct volume_group *vg, /* The VDO segment needs VDO pool which is layer above created striped data LV */ if (!(lp->segtype = get_segtype_from_string(vg->cmd, SEG_TYPE_NAME_VDO_POOL))) return_NULL; - - if (!(lv = _lv_create_an_lv(vg, lp, lp->pool_name))) + /* Use vpool names for vdo-pool */ + if (!(lv = _lv_create_an_lv(vg, lp, lp->pool_name ? : "vpool%d"))) return_NULL; } else { log_error(INTERNAL_ERROR "Creation of pool for unsupported segment type %s.", -- 2.43.5