mirror of
git://sourceware.org/git/lvm2.git
synced 2024-10-27 18:55:19 +03:00
debug: show proper error message for layer mismatch
Show proper internal error for failing command when there are some inconsitencies in sizes of LV and its layer instead of rather meaningless error code 5. (Could be hit i.e. if user tried to 'resize' cached LV and then uncache such LV.)
This commit is contained in:
parent
3e9c03cbbc
commit
d6a74025df
@ -6537,8 +6537,11 @@ int remove_layer_from_lv(struct logical_volume *lv,
|
|||||||
parent_seg->area_count != 1 ||
|
parent_seg->area_count != 1 ||
|
||||||
seg_type(parent_seg, 0) != AREA_LV ||
|
seg_type(parent_seg, 0) != AREA_LV ||
|
||||||
layer_lv != seg_lv(parent_seg, 0) ||
|
layer_lv != seg_lv(parent_seg, 0) ||
|
||||||
parent_lv->le_count != layer_lv->le_count)
|
parent_lv->le_count != layer_lv->le_count) {
|
||||||
return_0;
|
log_error(INTERNAL_ERROR "Inconsistent sizes of layer %s.",
|
||||||
|
display_lvname(lv));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!lv_empty(parent_lv))
|
if (!lv_empty(parent_lv))
|
||||||
return_0;
|
return_0;
|
||||||
|
Loading…
Reference in New Issue
Block a user