public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 lib/activate/activate.c lib/locking/locki ...
@ 2010-01-05 21:08 snitzer
0 siblings, 0 replies; only message in thread
From: snitzer @ 2010-01-05 21:08 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: snitzer@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 <snitzer@redhat.com>
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
--- LVM2/lib/activate/activate.c 2009/12/03 19:23:40 1.160
+++ LVM2/lib/activate/activate.c 2010/01/05 21:08:34 1.161
@@ -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;
}
--- LVM2/lib/locking/locking.c 2010/01/05 21:07:31 1.70
+++ LVM2/lib/locking/locking.c 2010/01/05 21:08:34 1.71
@@ -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;
}
--- LVM2/tools/pvmove.c 2010/01/05 21:07:31 1.71
+++ LVM2/tools/pvmove.c 2010/01/05 21:08:34 1.72
@@ -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,
--- LVM2/tools/vgchange.c 2010/01/05 20:56:52 1.93
+++ LVM2/tools/vgchange.c 2010/01/05 21:08:34 1.94
@@ -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 &&
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-05 21:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-05 21:08 LVM2 lib/activate/activate.c lib/locking/locki snitzer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).