diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2017-03-07 22:36:50 +0100 |
---|---|---|
committer | Heinz Mauelshagen <heinzm@redhat.com> | 2017-03-07 22:36:50 +0100 |
commit | aedac100f9474bb9b5184f9c6efbc25d49eb742a (patch) | |
tree | ef141826f2387a63e5c95fa4ae8fa1c375bb1d39 | |
parent | 18bbeec8257f2806770601db9483309c35cb5225 (diff) | |
download | lvm2-aedac100f9474bb9b5184f9c6efbc25d49eb742a.tar.gz |
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.
-rw-r--r-- | lib/report/report.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |