LVM2 lib/activate/activate.c lib/locking/locki ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: snitzer at sourceware.org 2010-01-05 21:08:35
Modified files:
lib/activate : activate.c lib/locking : locking.c tools : pvmove.c vgchange.c
Log message:
Add missing 'stack;' for all activate_lv and deactivate_lv callers.
Signed-off-by Mike Snitzer <[email protected]>
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.160&r2=1.161
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.c.diff?cvsroot=lvm2&r1=1.70&r2=1.71
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvmove.c.diff?cvsroot=lvm2&r1=1.71&r2=1.72
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgchange.c.diff?cvsroot=lvm2&r1=1.93&r2=1.94
lib/activate/activate.c +2 -1
@@ -714,7 +714,8 @@* 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 ; }
lib/locking/locking.c +2 -1
@@ -498,7 +498,8 @@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 ; }
tools/pvmove.c +9 -2
@@ -271,10 +271,17 @@static int _activate_lv (struct cmd_context *cmd,struct logical_volume *lv_mirr,unsigned exclusive) { +int r =0 ; +if (exclusive) -return activate_lv_excl (cmd, lv_mirr); + r =activate_lv_excl (cmd, lv_mirr); +else + r =activate_lv (cmd, lv_mirr); -return activate_lv (cmd, lv_mirr); +if (!r) + stack; + +return r; } static int _finish_pvmove(struct cmd_context *cmd, struct volume_group *vg,
tools/vgchange.c +15 -5
@@ -114,19 +114,29 @@ 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 &&