mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
report: fix lv_size with reshape space allocated
Commit f4b30b0dae
was about displaying visible LV size
when reshape space is allocated. Take parity devices
into account when displaying the user visible LV size.
This commit is contained in:
parent
c8671f6f79
commit
09ad36fb9b
@ -2321,7 +2321,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 (seg && !lv_is_raid_image(lv))
|
if (seg && !lv_is_raid_image(lv))
|
||||||
size -= seg->reshape_len * (seg->area_count > 2 ? seg->area_count : 1);
|
size -= seg->reshape_len * (seg->area_count > 2 ? (seg->area_count - seg->segtype->parity_devs) : 1);
|
||||||
|
|
||||||
size *= lv->vg->extent_size;
|
size *= lv->vg->extent_size;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user