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

cov: check for deactivation failure

This commit is contained in:
Zdenek Kabelac 2020-05-15 17:44:03 +02:00
parent 2a304d7a75
commit 33fdeaf3f1

View File

@ -991,8 +991,13 @@ static int _vgchange_locktype_single(struct cmd_context *cmd, const char *vg_nam
* deactivate it.
*/
if (vg->lock_type && !strcmp(vg->lock_type, "sanlock") &&
(cmd->command->command_enum == vgchange_locktype_CMD))
deactivate_lv(cmd, vg->sanlock_lv);
(cmd->command->command_enum == vgchange_locktype_CMD)) {
if (!deactivate_lv(cmd, vg->sanlock_lv)) {
log_error("Failed to deativate %s.",
display_lvname(vg->sanlock_lv));
return ECMD_FAILED;
}
}
log_print_unless_silent("Volume group \"%s\" successfully changed", vg->name);