From aedac100f9474bb9b5184f9c6efbc25d49eb742a Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Tue, 7 Mar 2017 22:36:50 +0100 Subject: [PATCH] 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. --- 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 e426371cd..4204d479b 100644 --- a/lib/report/report.c +++ b/lib/report/report.c @@ -2305,7 +2305,7 @@ static int _lv_size_disp(struct dm_report *rh, struct dm_pool *mem, uint64_t size = lv->le_count; 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;