1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

lv_manip: do not check extents for any virtual target

Allow creation of any virtual segment type with just --virtualsize
specified without any real extent size give.

TODO: likely --type error,zero might be later enhanced to use -V
(along with -L) - but since those targets do not allocate real
space, supporting -V makes sense with them.
This commit is contained in:
Zdenek Kabelac 2018-06-29 11:25:08 +02:00
parent 2bb9627d01
commit f2b856c994

View File

@ -7427,7 +7427,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
lp->extents = _round_to_stripe_boundary(vg, lp->extents, lp->stripes, 1); lp->extents = _round_to_stripe_boundary(vg, lp->extents, lp->stripes, 1);
if (!lp->extents && !seg_is_thin_volume(lp)) { if (!lp->extents && !seg_is_virtual(lp)) {
log_error(INTERNAL_ERROR "Unable to create new logical volume with no extents."); log_error(INTERNAL_ERROR "Unable to create new logical volume with no extents.");
return NULL; return NULL;
} }