mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cleanup: add internal error check
Check if 'is_removable' is defined and report internal error, if it's missing.
This commit is contained in:
parent
f5cd9c3563
commit
ddeb37f282
@ -864,8 +864,13 @@ static int _remove_mirror_images(struct logical_volume *lv,
|
||||
s >= 0 && old_area_count - new_area_count < orig_removed;
|
||||
s--) {
|
||||
sub_lv = seg_lv(mirrored_seg, s);
|
||||
if (!(is_temporary_mirror_layer(sub_lv) && lv_mirror_count(sub_lv) != 1) &&
|
||||
is_removable(sub_lv, removable_baton)) {
|
||||
if (!(is_temporary_mirror_layer(sub_lv) && lv_mirror_count(sub_lv) != 1)) {
|
||||
if (!is_removable) {
|
||||
log_error(INTERNAL_ERROR "Test is_removable undefined.");
|
||||
return 0;
|
||||
}
|
||||
if (!is_removable(sub_lv, removable_baton))
|
||||
continue;
|
||||
/*
|
||||
* Check if the user is trying to pull the
|
||||
* primary mirror image when the mirror is
|
||||
|
Loading…
Reference in New Issue
Block a user