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

Adjusted mirror region size only for mirrors and raids

Update region_size only for mirror and raid targets.
This fixes warning messages when vg is using small
extent size like 1KiB and no mirror/raid is created,
but the user still got the message:

$> vgcreate -s 1K vg  <pvs>
$> lvcreate -L10K vg
Using reduced mirror region size of 4 sectors
This commit is contained in:
Zdenek Kabelac 2011-11-15 17:32:12 +00:00
parent 5f129d15b1
commit 91e4512619
2 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.89 - Version 2.02.89 -
================================== ==================================
Adjusted mirror region size only for mirrors and raids.
Reorder prompt conditions for removal of active volumes. Reorder prompt conditions for removal of active volumes.
Avoid 'mda inconsistency' by properly registering UNLABELLED_PV flag (2.02.86). Avoid 'mda inconsistency' by properly registering UNLABELLED_PV flag (2.02.86).
Fix --enable-static_link unless using --enable-dmeventd / --enable-udev_sync. Fix --enable-static_link unless using --enable-dmeventd / --enable-udev_sync.

View File

@ -4197,6 +4197,10 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, struct l
lp->segtype->name); lp->segtype->name);
status |= LV_NOTSYNCED; status |= LV_NOTSYNCED;
} }
lp->region_size = adjusted_mirror_region_size(vg->extent_size,
lp->extents,
lp->region_size);
} }
if (!(lv = lv_create_empty(new_lv_name ? : "lvol%d", NULL, if (!(lv = lv_create_empty(new_lv_name ? : "lvol%d", NULL,
@ -4218,10 +4222,6 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, struct l
dm_list_splice(&lv->tags, &lp->tags); dm_list_splice(&lv->tags, &lp->tags);
lp->region_size = adjusted_mirror_region_size(vg->extent_size,
lp->extents,
lp->region_size);
if (!lv_extend(lv, lp->segtype, if (!lv_extend(lv, lp->segtype,
lp->stripes, lp->stripe_size, lp->stripes, lp->stripe_size,
lp->mirrors, lp->mirrors,