mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cache: validate for locked
Add extra safety.
This commit is contained in:
parent
d4dab0aa34
commit
6e57dbfcaa
@ -1,5 +1,6 @@
|
||||
Version 2.02.112 -
|
||||
=====================================
|
||||
Add extra validate for locked lv within validate_lv_cache_create().
|
||||
Add internal lvseg_name() function.
|
||||
Skip trying to file lock virtual internal vg name.
|
||||
Fix selection on {vg,lv}_permissions fields to properly match selection criteria.
|
||||
|
@ -104,6 +104,12 @@ int validate_lv_cache_create(const struct logical_volume *pool_lv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lv_is_locked(pool_lv)) {
|
||||
log_error("Cannot use locked cache pool %s.",
|
||||
display_lvname(pool_lv));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (origin_lv == pool_lv) {
|
||||
log_error("Can't use same LV %s for cache pool and cache volume.",
|
||||
display_lvname(pool_lv));
|
||||
@ -119,6 +125,12 @@ int validate_lv_cache_create(const struct logical_volume *pool_lv,
|
||||
}
|
||||
}
|
||||
|
||||
if (lv_is_locked(origin_lv)) {
|
||||
log_error("Cannot use locked origin volume %s.",
|
||||
display_lvname(origin_lv));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* For now we only support conversion of thin pool data volume */
|
||||
if (!lv_is_visible(origin_lv) && !lv_is_thin_pool_data(origin_lv)) {
|
||||
log_error("Can't convert internal LV %s.", display_lvname(origin_lv));
|
||||
|
Loading…
Reference in New Issue
Block a user