mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
clang: check segment lv is defined
This commit is contained in:
parent
5ec8f744d0
commit
0fbcb3b308
@ -1581,7 +1581,7 @@ static int _lv_reduce(struct logical_volume *lv, uint32_t extents, int delete)
|
||||
return_0;
|
||||
}
|
||||
|
||||
if (seg_is_thin_pool(seg)) {
|
||||
if (seg_is_thin_pool(seg) && seg_lv(seg, 0)) {
|
||||
/* For some segtypes the size may differ between the segment size and its layered LV
|
||||
* i.e. thin-pool and tdata.
|
||||
*
|
||||
|
@ -632,7 +632,7 @@ int check_lv_segments_complete_vg(struct logical_volume *lv)
|
||||
}
|
||||
|
||||
if (seg_is_mirrored(seg) && !seg_is_raid(seg) &&
|
||||
seg_type(seg, s) == AREA_LV &&
|
||||
seg_type(seg, s) == AREA_LV && seg_lv(seg, s) &&
|
||||
seg_lv(seg, s)->le_count != seg->area_len) {
|
||||
log_error("LV %s: mirrored LV segment %u has "
|
||||
"wrong size %u (should be %u).",
|
||||
|
Loading…
x
Reference in New Issue
Block a user