1
0
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:
Heinz Mauelshagen 2017-03-10 22:44:32 +01:00
parent c8671f6f79
commit 09ad36fb9b

View File

@ -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;