1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-08-02 04:22:02 +03:00

cache: add more validation

This commit is contained in:
Zdenek Kabelac
2015-08-11 15:11:45 +02:00
parent f0c18fceb4
commit 533ac4d47d
4 changed files with 24 additions and 2 deletions

View File

@ -100,6 +100,9 @@ static int _cache_pool_text_import(struct lv_segment *seg,
* If the policy is not present, default policy is used.
*/
if ((sn = dm_config_find_node(sn, "policy_settings"))) {
if (!seg->policy_name)
return SEG_LOG_ERROR("policy_settings must have a policy_name in");
if (sn->v)
return SEG_LOG_ERROR("policy_settings must be a section in");