mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
vdo: suffle code for better error path handling
For failing dm_ no need to report 2nd. error, but we missed to report error with 'updated==NULL'.
This commit is contained in:
parent
e2e31d9acf
commit
493acb9195
@ -1347,9 +1347,15 @@ int get_vdo_settings(struct cmd_context *cmd,
|
|||||||
u |= VDO_CHANGE_ONLINE;
|
u |= VDO_CHANGE_ONLINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (updated) {
|
|
||||||
// validation of updated VDO option
|
// validation of updated VDO option
|
||||||
if (!dm_vdo_validate_target_params(vtp, 0 /* vdo_size */)) {
|
if (!dm_vdo_validate_target_params(vtp, 0 /* vdo_size */))
|
||||||
|
goto_out;
|
||||||
|
|
||||||
|
if (updated)
|
||||||
|
*updated = u;
|
||||||
|
|
||||||
|
r = 1; // success
|
||||||
|
goto out;
|
||||||
err:
|
err:
|
||||||
if (is_lvchange)
|
if (is_lvchange)
|
||||||
log_error("Cannot change VDO setting \"vdo_%s\" in existing VDO pool.",
|
log_error("Cannot change VDO setting \"vdo_%s\" in existing VDO pool.",
|
||||||
@ -1357,13 +1363,7 @@ err:
|
|||||||
else
|
else
|
||||||
log_error("Invalid argument for VDO setting \"vdo_%s\".",
|
log_error("Invalid argument for VDO setting \"vdo_%s\".",
|
||||||
option);
|
option);
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
*updated = u;
|
|
||||||
}
|
|
||||||
|
|
||||||
r = 1;
|
|
||||||
out:
|
out:
|
||||||
if (result)
|
if (result)
|
||||||
dm_config_destroy(result);
|
dm_config_destroy(result);
|
||||||
|
Loading…
Reference in New Issue
Block a user