public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW tools/vgreduce.c
@ 2012-03-30 14:59 zkabelac
0 siblings, 0 replies; 4+ messages in thread
From: zkabelac @ 2012-03-30 14:59 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2012-03-30 14:59:36
Modified files:
. : WHATS_NEW
tools : vgreduce.c
Log message:
Fix unlocking in error path of vgreduce
When vg_read fails, it internally unlocks VG if it's been locked,
so in error path we should skip unlock_vg for this case.
(user would see ugly internal warning)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2374&r2=1.2375
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgreduce.c.diff?cvsroot=lvm2&r1=1.116&r2=1.117
--- LVM2/WHATS_NEW 2012/03/30 11:39:52 1.2374
+++ LVM2/WHATS_NEW 2012/03/30 14:59:35 1.2375
@@ -1,5 +1,6 @@
Version 2.02.96 -
================================
+ Fix unlocking volume group in vgreduce in error path.
Exit immediately if LISTEN_PID env var incorrect during systemd handover.
Detect VG name being part of the LV name in lvconvert --splitmirrors -n.
Fix exclusive lvchange running from other node. (2.02.89)
--- LVM2/tools/vgreduce.c 2012/02/27 10:06:58 1.116
+++ LVM2/tools/vgreduce.c 2012/03/30 14:59:35 1.117
@@ -206,6 +206,7 @@
int fixed = 1;
int repairing = arg_count(cmd, removemissing_ARG);
int saved_ignore_suspended_devices = ignore_suspended_devices();
+ int locked = 0;
if (!argc && !repairing) {
log_error("Please give volume group name and "
@@ -260,6 +261,8 @@
&& !arg_count(cmd, removemissing_ARG))
goto_out;
+ locked = !vg_read_error(vg);
+
if (repairing) {
if (!vg_read_error(vg) && !vg_missing_pv_count(vg)) {
log_error("Volume group \"%s\" is already consistent",
@@ -275,6 +278,7 @@
READ_ALLOW_INCONSISTENT
| READ_ALLOW_EXPORTED);
+ locked |= !vg_read_error(vg);
if (vg_read_error(vg) && vg_read_error(vg) != FAILED_READ_ONLY
&& vg_read_error(vg) != FAILED_INCONSISTENT)
goto_out;
@@ -314,7 +318,10 @@
}
out:
init_ignore_suspended_devices(saved_ignore_suspended_devices);
- unlock_and_release_vg(cmd, vg, vg_name);
+ if (locked)
+ unlock_vg(cmd, vg_name);
+
+ release_vg(vg);
return ret;
^ permalink raw reply [flat|nested] 4+ messages in thread
* LVM2 ./WHATS_NEW tools/vgreduce.c
@ 2007-01-31 16:26 agk
0 siblings, 0 replies; 4+ messages in thread
From: agk @ 2007-01-31 16:26 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2007-01-31 16:26:23
Modified files:
. : WHATS_NEW
tools : vgreduce.c
Log message:
Fix some &->&& vgreduce cmdline validation. [Andre Noll]
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.568&r2=1.569
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgreduce.c.diff?cvsroot=lvm2&r1=1.55&r2=1.56
--- LVM2/WHATS_NEW 2007/01/30 21:37:18 1.568
+++ LVM2/WHATS_NEW 2007/01/31 16:26:22 1.569
@@ -1,5 +1,6 @@
Version 2.02.22 -
===================================
+ Fix some vgreduce --removemissing command line validation.
Version 2.02.21 - 30th January 2007
===================================
--- LVM2/tools/vgreduce.c 2007/01/09 23:14:34 1.55
+++ LVM2/tools/vgreduce.c 2007/01/31 16:26:23 1.56
@@ -427,13 +427,13 @@
int ret = 1;
int consistent = 1;
- if (!argc & !arg_count(cmd, removemissing_ARG)) {
+ if (!argc && !arg_count(cmd, removemissing_ARG)) {
log_error("Please give volume group name and "
"physical volume paths");
return EINVALID_CMD_LINE;
}
- if (!argc & arg_count(cmd, removemissing_ARG)) {
+ if (!argc && arg_count(cmd, removemissing_ARG)) {
log_error("Please give volume group name");
return EINVALID_CMD_LINE;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* LVM2 ./WHATS_NEW tools/vgreduce.c
@ 2006-09-07 23:23 agk
0 siblings, 0 replies; 4+ messages in thread
From: agk @ 2006-09-07 23:23 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2006-09-07 23:23:45
Modified files:
. : WHATS_NEW
tools : vgreduce.c
Log message:
fix vgreduce clustered check
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.435&r2=1.436
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgreduce.c.diff?cvsroot=lvm2&r1=1.52&r2=1.53
--- LVM2/WHATS_NEW 2006/09/02 01:18:16 1.435
+++ LVM2/WHATS_NEW 2006/09/07 23:23:45 1.436
@@ -1,5 +1,6 @@
Version 2.02.10 -
==================================
+ Don't attempt automatic recovery without proper locking.
When using local file locking, skip clustered VGs.
Add fallback_to_clustered_locking and fallback_to_local_locking parameters.
lvm.static uses built-in cluster locking instead of external locking.
--- LVM2/tools/vgreduce.c 2006/09/02 01:18:17 1.52
+++ LVM2/tools/vgreduce.c 2006/09/07 23:23:45 1.53
@@ -476,7 +476,7 @@
return ECMD_FAILED;
}
- if ((vg->status & CLUSTERED) && !locking_is_clustered() &&
+ if (vg && (vg->status & CLUSTERED) && !locking_is_clustered() &&
!lockingfailed()) {
log_error("Skipping clustered volume group %s", vg->name);
unlock_vg(cmd, vg_name);
^ permalink raw reply [flat|nested] 4+ messages in thread
* LVM2 ./WHATS_NEW tools/vgreduce.c
@ 2005-12-21 18:51 agk
0 siblings, 0 replies; 4+ messages in thread
From: agk @ 2005-12-21 18:51 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2005-12-21 18:51:51
Modified files:
. : WHATS_NEW
tools : vgreduce.c
Log message:
vgreduce replaces active LVs with error segment before removing them.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.337&r2=1.338
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgreduce.c.diff?cvsroot=lvm2&r1=1.39&r2=1.40
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-30 14:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-30 14:59 LVM2 ./WHATS_NEW tools/vgreduce.c zkabelac
-- strict thread matches above, loose matches on Subject: below --
2007-01-31 16:26 agk
2006-09-07 23:23 agk
2005-12-21 18:51 agk
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).