1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-26 22:50:36 +03:00

Add missing 'stack;' for all activate_lv and deactivate_lv callers.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
Mike Snitzer 2010-01-05 21:08:34 +00:00
parent df13cf08d5
commit 56b3d20462
4 changed files with 29 additions and 10 deletions

View File

@ -714,7 +714,8 @@ int lv_is_active(struct logical_volume *lv)
* FIXME: check status to not deactivate already activate device
*/
if (activate_lv_excl(lv->vg->cmd, lv)) {
deactivate_lv(lv->vg->cmd, lv);
if (!deactivate_lv(lv->vg->cmd, lv))
stack;
return 0;
}

View File

@ -498,7 +498,8 @@ int activate_lvs(struct cmd_context *cmd, struct dm_list *lvs, unsigned exclusiv
log_error("Failed to activate %s", lvl->lv->name);
dm_list_uniterate(lvh, lvs, &lvl->list) {
lvl = dm_list_item(lvh, struct lv_list);
activate_lv(cmd, lvl->lv);
if (!activate_lv(cmd, lvl->lv))
stack;
}
return 0;
}

View File

@ -271,10 +271,17 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
static int _activate_lv(struct cmd_context *cmd, struct logical_volume *lv_mirr,
unsigned exclusive)
{
if (exclusive)
return activate_lv_excl(cmd, lv_mirr);
int r = 0;
return activate_lv(cmd, lv_mirr);
if (exclusive)
r = activate_lv_excl(cmd, lv_mirr);
else
r = activate_lv(cmd, lv_mirr);
if (!r)
stack;
return r;
}
static int _finish_pvmove(struct cmd_context *cmd, struct volume_group *vg,

View File

@ -114,19 +114,29 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd,
expected_count++;
if (activate == CHANGE_AN) {
if (!deactivate_lv(cmd, lv))
if (!deactivate_lv(cmd, lv)) {
stack;
continue;
}
} else if (activate == CHANGE_ALN) {
if (!deactivate_lv_local(cmd, lv))
if (!deactivate_lv_local(cmd, lv)) {
stack;
continue;
}
} else if (lv_is_origin(lv) || (activate == CHANGE_AE)) {
if (!activate_lv_excl(cmd, lv))
if (!activate_lv_excl(cmd, lv)) {
stack;
continue;
}
} else if (activate == CHANGE_ALY) {
if (!activate_lv_local(cmd, lv))
if (!activate_lv_local(cmd, lv)) {
stack;
continue;
} else if (!activate_lv(cmd, lv))
}
} else if (!activate_lv(cmd, lv)) {
stack;
continue;
}
if (background_polling() &&
activate != CHANGE_AN && activate != CHANGE_ALN &&