mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
raid_manip: fix wrong image size allocation on raid10 "lvconvert --replace ..."
This commit is contained in:
parent
fb957ef322
commit
b33d7586e7
@ -460,9 +460,12 @@ static int _alloc_image_components(struct logical_volume *lv,
|
||||
* individual devies, we must specify how large the individual device
|
||||
* is along with the number we want ('count').
|
||||
*/
|
||||
extents = (segtype->parity_devs) ?
|
||||
(lv->le_count / (seg->area_count - segtype->parity_devs)) :
|
||||
lv->le_count;
|
||||
if (segtype_is_raid10(segtype))
|
||||
extents = lv->le_count / (seg->area_count / 2); /* we enforce 2 mirrors right now */
|
||||
else
|
||||
extents = (segtype->parity_devs) ?
|
||||
(lv->le_count / (seg->area_count - segtype->parity_devs)) :
|
||||
lv->le_count;
|
||||
|
||||
if (!(ah = allocate_extents(lv->vg, NULL, segtype, 0, count, count,
|
||||
region_size, extents, pvs,
|
||||
|
Loading…
Reference in New Issue
Block a user