1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvconvert: external detects more conflicts

Check for more prohibited types for external origin conversion.
TODO: Move this function to separate validation code.
(Continuing in release fixes.)
This commit is contained in:
Zdenek Kabelac 2014-10-19 22:04:02 +02:00
parent 8a2f553b7d
commit 128131dbc5

View File

@ -2664,12 +2664,16 @@ static int _lvconvert_thin(struct cmd_context *cmd,
return 0;
}
if (lv_is_cache_type(lv) ||
if (lv_is_locked(lv) ||
!lv_is_visible(lv) ||
lv_is_cache_type(lv) ||
lv_is_cow(lv) ||
lv_is_pool(lv) ||
lv_is_thin_pool_data(lv) ||
lv_is_thin_pool_metadata(lv)) {
log_error("Can't use %s %s as external origin.",
lv_is_pool_data(lv) ||
lv_is_pool_metadata(lv)) {
log_error("Can't use%s%s %s %s as external origin.",
lv_is_locked(lv) ? " locked" : "",
lv_is_visible(lv) ? "" : " hidden",
lvseg_name(first_seg(lv)),
display_lvname(lv));
return 0;