public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: mbroz@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW lib/metadata/metadata.c test/ ...
Date: Wed, 17 Mar 2010 14:44:00 -0000	[thread overview]
Message-ID: <20100317144420.23080.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz@sourceware.org	2010-03-17 14:44:19

Modified files:
	.              : WHATS_NEW 
	lib/metadata   : metadata.c 
	test           : t-vgsplit-stacked.sh 

Log message:
	Fix pvcreate device check.
	
	If user try to vgcreate or vgextend non-existent VG,
	these messages appears:
	
	# vgcreate xxx /dev/xxx
	Internal error: Volume Group xxx was not unlocked
	Device /dev/xxx not found (or ignored by filtering).
	Unable to add physical volume '/dev/xxx' to volume group 'xxx'.
	Internal error: Attempt to unlock unlocked VG xxx.
	
	(the same with existing VG and non-existing PV & vgextend)
	# vgextend vg_test /dev/xxx
	...
	
	It is caused because code tries to "refresh" cache if
	md filter is switched on using cache destroy.
	
	But we can change filters and rescan even without this
	machinery now, just use refresh_filters
	(and reset md filter afterwards).
	
	(Patch also  discovers cache alias bug in vgsplit test,
	fix it by using better filter line.)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1465&r2=1.1466
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.322&r2=1.323
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgsplit-stacked.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2

--- LVM2/WHATS_NEW	2010/03/17 02:11:18	1.1465
+++ LVM2/WHATS_NEW	2010/03/17 14:44:18	1.1466
@@ -1,5 +1,6 @@
 Version 2.02.63 - 
 ================================
+  Fix pvcreate device md filter check.
   Suppress repeated errors about the same missing PV uuids.
   Bypass full device scans when using internally-cached VG metadata.
   Only do one full device scan during each read of text format metadata.
--- LVM2/lib/metadata/metadata.c	2010/03/16 17:30:02	1.322
+++ LVM2/lib/metadata/metadata.c	2010/03/17 14:44:18	1.323
@@ -1290,18 +1290,10 @@
 	dev = dev_cache_get(name, cmd->filter);
 
 	/* Is there an md superblock here? */
+	/* FIXME: still possible issues here - rescan cache? */
 	if (!dev && md_filtering()) {
-		unlock_vg(cmd, VG_ORPHANS);
-
-		persistent_filter_wipe(cmd->filter);
-		lvmcache_destroy(cmd, 1);
-
+		refresh_filters(cmd);
 		init_md_filtering(0);
-		if (!lock_vol(cmd, VG_ORPHANS, LCK_VG_WRITE)) {
-			log_error("Can't get lock for orphan PVs");
-			init_md_filtering(1);
-			return 0;
-		}
 		dev = dev_cache_get(name, cmd->filter);
 		init_md_filtering(1);
 	}
--- LVM2/test/t-vgsplit-stacked.sh	2009/08/02 21:45:45	1.1
+++ LVM2/test/t-vgsplit-stacked.sh	2010/03/17 14:44:19	1.2
@@ -1,6 +1,6 @@
 . ./test-utils.sh
 
-prepare_lvmconf '[ "a/dev\/mirror/", "a/dev\/mapper\/.*$/", "r/.*/" ]'
+prepare_lvmconf '[ "a/dev\/mirror/", "a/dev\/mapper\/.*$/", "a/dev\/LVMTEST/", "r/.*/" ]'
 aux prepare_devs 3
 
 pvcreate $devs


                 reply	other threads:[~2010-03-17 14:44 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=20100317144420.23080.qmail@sourceware.org \
    --to=mbroz@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /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 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).