mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
report: fix segfault
Commit f4b30b0dae
which was about displaying visible
LV size when reshape space is allocated did not account
for undefined first lv segment.
This commit is contained in:
parent
11f1556d5d
commit
7f25fbe154
@ -2304,7 +2304,7 @@ static int _lv_size_disp(struct dm_report *rh, struct dm_pool *mem,
|
||||
const struct lv_segment *seg = first_seg(lv);
|
||||
uint64_t size = lv->le_count;
|
||||
|
||||
if (!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 *= lv->vg->extent_size;
|
||||
|
Loading…
Reference in New Issue
Block a user