From 09ad36fb9b3bc7cda7aa946c39a387ad69317be7 Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Fri, 10 Mar 2017 22:44:32 +0100 Subject: [PATCH] report: fix lv_size with reshape space allocated Commit f4b30b0daef3 was about displaying visible LV size when reshape space is allocated. Take parity devices into account when displaying the user visible LV size. --- lib/report/report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/report/report.c b/lib/report/report.c index afd922e22..fcb9e3367 100644 --- a/lib/report/report.c +++ b/lib/report/report.c @@ -2321,7 +2321,7 @@ static int _lv_size_disp(struct dm_report *rh, struct dm_pool *mem, uint64_t size = lv->le_count; 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;