All of lore.kernel.org
 help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW tools/vgreduce.c
@ 2007-01-31 16:26 agk
  0 siblings, 0 replies; 2+ messages in thread
From: agk @ 2007-01-31 16:26 UTC (permalink / raw)
  To: lvm-devel

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk at 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] 2+ messages in thread

* LVM2 ./WHATS_NEW tools/vgreduce.c
@ 2012-03-30 14:59 zkabelac
  0 siblings, 0 replies; 2+ messages in thread
From: zkabelac @ 2012-03-30 14:59 UTC (permalink / raw)
  To: lvm-devel

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac at 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] 2+ messages in thread

end of thread, other threads:[~2012-03-30 14:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-31 16:26 LVM2 ./WHATS_NEW tools/vgreduce.c agk
2012-03-30 14:59 zkabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.