public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/metadata/metadata.c tools ...
@ 2008-08-29 13:41 mbroz
  0 siblings, 0 replies; 4+ messages in thread
From: mbroz @ 2008-08-29 13:41 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz@sourceware.org	2008-08-29 13:41:21

Modified files:
	.              : WHATS_NEW 
	lib/metadata   : metadata.c 
	tools          : vgconvert.c 

Log message:
	Fix setting of volume limit count if converting to lvm1 format.
	
	Fixes problem when after downconvert to lvm1 VG is broken:
	
	# lvcreate -n lv1 -l 4 vg_test
	Invalid LV in extent map (PV /dev/sdb1, PE 0, LV 0, LE 0)
	...

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.949&r2=1.950
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.186&r2=1.187
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgconvert.c.diff?cvsroot=lvm2&r1=1.29&r2=1.30

--- LVM2/WHATS_NEW	2008/08/28 18:41:50	1.949
+++ LVM2/WHATS_NEW	2008/08/29 13:41:21	1.950
@@ -1,5 +1,6 @@
 Version 2.02.40 - 
 ================================
+  Fix setting of volume limit count if converting to lvm1 format.
   Fix vgconvert logical volume id metadata validation.
   Fix lvmdump metadata gather option (-m) to work correctly.
   Fix allocation bug in text metadata format write error path.
--- LVM2/lib/metadata/metadata.c	2008/08/13 13:42:35	1.186
+++ LVM2/lib/metadata/metadata.c	2008/08/29 13:41:21	1.187
@@ -1255,6 +1255,13 @@
 		}
 	}
 
+	if (!(vg->fid->fmt->features & FMT_UNLIMITED_VOLS) &&
+	    (!vg->max_lv || !vg->max_pv)) {
+		log_error("Internal error: Volume group %s has limited PV/LV count"
+			  " but limit is not set.", vg->name);
+		r = 0;
+	}
+
 	return r;
 }
 
--- LVM2/tools/vgconvert.c	2008/08/28 18:41:51	1.29
+++ LVM2/tools/vgconvert.c	2008/08/29 13:41:21	1.30
@@ -81,6 +81,15 @@
 		return ECMD_FAILED;
 	}
 
+	/* Set PV/LV limit if converting from unlimited metadata format */
+	if (vg->fid->fmt->features & FMT_UNLIMITED_VOLS &&
+	    !(cmd->fmt->features & FMT_UNLIMITED_VOLS)) {
+		if (!vg->max_lv)
+			vg->max_lv = 255;
+		if (!vg->max_pv)
+			vg->max_pv = 255;
+	}
+
 	/* If converting to restricted lvid, check if lvid is compatible */
 	if (!(vg->fid->fmt->features & FMT_RESTRICTED_LVIDS) &&
 	    cmd->fmt->features & FMT_RESTRICTED_LVIDS)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* LVM2 ./WHATS_NEW lib/metadata/metadata.c tools ...
@ 2010-12-22 15:36 zkabelac
  0 siblings, 0 replies; 4+ messages in thread
From: zkabelac @ 2010-12-22 15:36 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2010-12-22 15:36:42

Modified files:
	.              : WHATS_NEW 
	lib/metadata   : metadata.c 
	tools          : vgrename.c 

Log message:
	Add backtraces for backup and backup_remove fail paths

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1854&r2=1.1855
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.418&r2=1.419
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgrename.c.diff?cvsroot=lvm2&r1=1.73&r2=1.74

--- LVM2/WHATS_NEW	2010/12/22 15:28:44	1.1854
+++ LVM2/WHATS_NEW	2010/12/22 15:36:41	1.1855
@@ -1,5 +1,6 @@
 Version 2.02.80 - 
 ====================================
+  Add backtraces for backup and backup_remove fail paths.
   Detect errors from dm_task_set calls in _get_device_info (dmeventd).
   Add backtraces for archive and backup_locally in check_current_backup().
   Fix memory leak in debug mode of restart_clvmd() error path.
--- LVM2/lib/metadata/metadata.c	2010/12/14 17:51:09	1.418
+++ LVM2/lib/metadata/metadata.c	2010/12/22 15:36:41	1.419
@@ -611,7 +611,8 @@
 		}
 	}
 
-	backup_remove(vg->cmd, vg->name);
+	if (!backup_remove(vg->cmd, vg->name))
+		stack;
 
 	if (ret)
 		log_print("Volume group \"%s\" successfully removed", vg->name);
--- LVM2/tools/vgrename.c	2010/12/08 20:50:51	1.73
+++ LVM2/tools/vgrename.c	2010/12/22 15:36:42	1.74
@@ -164,8 +164,10 @@
 		}
 	}
 
-	backup(vg);
-	backup_remove(cmd, vg_name_old);
+	if (!backup(vg))
+		stack;
+	if (!backup_remove(cmd, vg_name_old))
+		stack;
 
 	unlock_vg(cmd, vg_name_new);
 	unlock_and_free_vg(cmd, vg, vg_name_old);


^ permalink raw reply	[flat|nested] 4+ messages in thread

* LVM2 ./WHATS_NEW lib/metadata/metadata.c tools ...
@ 2009-07-24 15:01 wysochanski
  0 siblings, 0 replies; 4+ messages in thread
From: wysochanski @ 2009-07-24 15:01 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2009-07-24 15:01:44

Modified files:
	.              : WHATS_NEW 
	lib/metadata   : metadata.c 
	tools          : vgcreate.c vgextend.c 

Log message:
	Revert previous patch that moved VG_ORPHAN lock inside vg_extend.
	
	We must hold the VG_ORPHAN lock until we commit to disk.  Otherwise,
	we risk a race condition on vgcreate / vgextend.  Reverts the following
	commit:
	
	commit 72a41480ba66d7dc2d05ef8583080b6b08208507
	Author: Dave Wysochanski <dwysocha@redhat.com>
	Date:   Fri Jul 10 20:09:21 2009 +0000
	
	Move orphan lock obtain/release inside vg_extend().
	
	With this change we now have vgcreate/vgextend liblvm functions.
	Note that this changes the lock order of the following functions as the
	orphan lock is now obtained first.  With our policy of non-blocking
	second locks, this should not be a problem.
	
	Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1199&r2=1.1200
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.258&r2=1.259
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgcreate.c.diff?cvsroot=lvm2&r1=1.64&r2=1.65
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgextend.c.diff?cvsroot=lvm2&r1=1.47&r2=1.48

--- LVM2/WHATS_NEW	2009/07/23 23:55:01	1.1199
+++ LVM2/WHATS_NEW	2009/07/24 15:01:43	1.1200
@@ -1,5 +1,7 @@
 Version 2.02.50 - 
 ================================
+  Fix race condition with vgcreate and vgextend on same device (2.02.49).
+  Remove redundant validate_name call from vgreduce.
   Add lvm_{pv|vg|lv}_get_{name|uuid} liblvm functions.
   Add lvm_vg_list_pvs and lvm_vg_list_lvs liblvm functions.
   Remove unused handles lvseg, pvseg inside liblvm/lvm.h.
--- LVM2/lib/metadata/metadata.c	2009/07/16 20:18:16	1.258
+++ LVM2/lib/metadata/metadata.c	2009/07/24 15:01:43	1.259
@@ -518,11 +518,6 @@
 	if (_vg_bad_status_bits(vg, RESIZEABLE_VG))
 		return 0;
 
-	if (!lock_vol(cmd, VG_ORPHANS, LCK_VG_WRITE)) {
-		log_error("Can't get lock for orphan PVs");
-		return 0;
-	}
-
 	/* attach each pv */
 	for (i = 0; i < pv_count; i++) {
 		if (!(pv = pv_by_path(vg->fid->fmt->cmd, pv_names[i]))) {
@@ -536,13 +531,11 @@
 
 /* FIXME Decide whether to initialise and add new mdahs to format instance */
 
-	unlock_vg(cmd, VG_ORPHANS);
 	return 1;
 
       bad:
 	log_error("Unable to add physical volume '%s' to "
 		  "volume group '%s'.", pv_names[i], vg->name);
-	unlock_vg(cmd, VG_ORPHANS);
 	return 0;
 }
 
--- LVM2/tools/vgcreate.c	2009/07/10 20:09:21	1.64
+++ LVM2/tools/vgcreate.c	2009/07/24 15:01:44	1.65
@@ -57,6 +57,11 @@
 	    !vg_set_alloc_policy(vg, vp_new.alloc))
 		goto_bad;
 
+	if (!lock_vol(cmd, VG_ORPHANS, LCK_VG_WRITE)) {
+		log_error("Can't get lock for orphan PVs");
+		goto bad_orphan;
+	}
+
 	/* attach the pv's */
 	if (!vg_extend(vg, argc - 1, argv + 1))
 		goto_bad;
@@ -106,6 +111,7 @@
 		goto bad;
 	}
 
+	unlock_vg(cmd, VG_ORPHANS);
 	unlock_vg(cmd, vp_new.vg_name);
 
 	backup(vg);
@@ -117,6 +123,8 @@
 	return ECMD_PROCESSED;
 
 bad:
+	unlock_vg(cmd, VG_ORPHANS);
+bad_orphan:
 	vg_release(vg);
 	unlock_vg(cmd, vp_new.vg_name);
 	return ECMD_FAILED;
--- LVM2/tools/vgextend.c	2009/07/14 02:14:05	1.47
+++ LVM2/tools/vgextend.c	2009/07/24 15:01:44	1.48
@@ -42,6 +42,7 @@
 		vg_release(vg);
 		return ECMD_FAILED;
 	}
+
 /********** FIXME
 	log_print("maximum logical volume size is %s",
 		  (dummy = lvm_show_size(LVM_LV_SIZE_MAX(vg) / 2, LONG)));
@@ -52,6 +53,11 @@
 	if (!archive(vg))
 		goto error;
 
+	if (!lock_vol(cmd, VG_ORPHANS, LCK_VG_WRITE)) {
+		log_error("Can't get lock for orphan PVs");
+		return ECMD_FAILED;
+	}
+
 	/* extend vg */
 	if (!vg_extend(vg, argc, argv))
 		goto error;
@@ -69,6 +75,7 @@
 	r = ECMD_PROCESSED;
 
 error:
+	unlock_vg(cmd, VG_ORPHANS);
 	unlock_and_release_vg(cmd, vg, vg_name);
 	return r;
 }


^ permalink raw reply	[flat|nested] 4+ messages in thread

* LVM2 ./WHATS_NEW lib/metadata/metadata.c tools ...
@ 2005-05-19 16:50 agk
  0 siblings, 0 replies; 4+ messages in thread
From: agk @ 2005-05-19 16:50 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2005-05-19 16:48:52

Modified files:
	.              : WHATS_NEW 
	lib/metadata   : metadata.c 
	tools          : vgmerge.c 

Log message:
	Fix vgmerge to handle duplicate LVIDs.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.245&r2=1.246
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.77&r2=1.78
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/vgmerge.c.diff?cvsroot=lvm2&r1=1.27&r2=1.28


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-22 15:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-29 13:41 LVM2 ./WHATS_NEW lib/metadata/metadata.c tools mbroz
  -- strict thread matches above, loose matches on Subject: below --
2010-12-22 15:36 zkabelac
2009-07-24 15:01 wysochanski
2005-05-19 16:50 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).