mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
report: correct lv_size for 2-legged raid5
Reshaping a raid5 LV to one stripe aiming to convert it to raid1 (and optionally to linear) reports the wrong LV size when still having reshape space allocated.
This commit is contained in:
parent
18bbeec825
commit
aedac100f9
@ -2305,7 +2305,7 @@ static int _lv_size_disp(struct dm_report *rh, struct dm_pool *mem,
|
|||||||
uint64_t size = lv->le_count;
|
uint64_t size = lv->le_count;
|
||||||
|
|
||||||
if (!lv_is_raid_image(lv))
|
if (!lv_is_raid_image(lv))
|
||||||
size -= seg->reshape_len * seg->area_count;
|
size -= seg->reshape_len * (seg->area_count > 2 ? seg->area_count : 1);
|
||||||
|
|
||||||
size *= lv->vg->extent_size;
|
size *= lv->vg->extent_size;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user