All of lore.kernel.org
 help / color / mirror / Atom feed
From: prajnoha@sourceware.org <prajnoha@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 lib/format1/format1.c lib/format_text/arc ...
Date: 25 Feb 2011 14:12:15 -0000	[thread overview]
Message-ID: <20110225141215.4017.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha at sourceware.org	2011-02-25 14:12:15

Modified files:
	lib/format1    : format1.c 
	lib/format_text: archiver.c 
	test           : t-pvcreate-usage.sh 

Log message:
	vgconvert is fixed now to work with the changes in metadata area handling - enable the tests.
	Add a small fix that preserves pe_start for lvm1 PVs when being converted.
	
	(this fix needs to be replaced with something more clever, but let's have this working now)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format1/format1.c.diff?cvsroot=lvm2&r1=1.132&r2=1.133
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archiver.c.diff?cvsroot=lvm2&r1=1.42&r2=1.43
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-usage.sh.diff?cvsroot=lvm2&r1=1.18&r2=1.19

--- LVM2/lib/format1/format1.c	2011/02/21 12:26:27	1.132
+++ LVM2/lib/format1/format1.c	2011/02/25 14:12:14	1.133
@@ -400,7 +400,7 @@
 
 static int _format1_pv_setup(const struct format_type *fmt,
 			     struct physical_volume *pv,
-			     struct volume_group *vg __attribute__((unused)))
+			     struct volume_group *vg)
 {
 	return _format1_pv_initialise(fmt, -1, 0, 0, vg->extent_size, 0, 0, pv);
 }
--- LVM2/lib/format_text/archiver.c	2011/02/25 13:59:47	1.42
+++ LVM2/lib/format_text/archiver.c	2011/02/25 14:12:14	1.43
@@ -296,6 +296,7 @@
 	struct pv_list *pvl;
 	struct format_instance *fid;
 	struct format_instance_ctx fic;
+	uint32_t tmp;
 
 	/*
 	 * FIXME: Check that the PVs referenced in the backup are
@@ -320,11 +321,14 @@
 
 	/* Add any metadata areas on the PVs */
 	dm_list_iterate_items(pvl, &vg->pvs) {
+		tmp = vg->extent_size;
+		vg->extent_size = 0;
 		if (!vg->fid->fmt->ops->pv_setup(vg->fid->fmt, pvl->pv, vg)) {
 			log_error("Format-specific setup for %s failed",
 				  pv_dev_name(pvl->pv));
 			return 0;
 		}
+		vg->extent_size = tmp;
 	}
 
 	if (!vg_write(vg) || !vg_commit(vg))
--- LVM2/test/t-pvcreate-usage.sh	2011/02/21 12:37:33	1.18
+++ LVM2/test/t-pvcreate-usage.sh	2011/02/25 14:12:14	1.19
@@ -133,18 +133,18 @@
 
 #COMM 'pv with LVM1 compatible data alignment can be convereted'
 #compatible == LVM1_PE_ALIGN == 64k
-#pvcreate --dataalignment 256k $dev1
-#vgcreate -s 1m $vg $dev1
-#vgconvert -M1 $vg
-#vgconvert -M2 $vg
-#check pv_field $dev1 pe_start 256.00k
-#vgremove $vg
+pvcreate --dataalignment 256k $dev1
+vgcreate -s 1m $vg $dev1
+vgconvert -M1 $vg
+vgconvert -M2 $vg
+check pv_field $dev1 pe_start 256.00k
+vgremove $vg
 
 #COMM 'pv with LVM1 incompatible data alignment cannot be convereted'
 pvcreate --dataalignment 10k $dev1
 vgcreate -s 1m $vg $dev1
 not vgconvert -M1 $vg
-#vgremove $vg
+vgremove $vg
 
 #COMM 'vgcfgrestore allows pe_start=0'
 #basically it produces nonsense, but it tests vgcfgrestore,



                 reply	other threads:[~2011-02-25 14:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110225141215.4017.qmail@sourceware.org \
    --to=prajnoha@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.