public inbox for
help / color / mirror / Atom feed
Subject: LVM2/tools pvchange.c
Date: Mon, 28 Jun 2010 20:38:00 -0000	[thread overview]
Message-ID: <> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	2010-06-28 20:38:06

Modified files:
	tools          : pvchange.c 

Log message:
	Set vg_mda_copies when pvchange --metadataignore is given.
	When a user explicitly sets a new mda ignore value for a PV, we
	should update vg_mda_copies accordingly.  When the VG is written
	out, the user would not want the new ignore state to get lost as
	a result of the vg_mda_copies value and logic in the vg_write
	Signed-off-by: Dave Wysochanski <>


--- LVM2/tools/pvchange.c	2010/06/28 20:33:58	1.77
+++ LVM2/tools/pvchange.c	2010/06/28 20:38:06	1.78
@@ -147,6 +147,17 @@
 		if (!pv_mda_set_ignored(pv, mda_ignore)) {
 			goto out;
+		/*
+		 * Update vg_mda_copies based on the mdas in this PV.
+		 * This is most likely what the user would expect - if they
+		 * specify a specific PV to be ignored/un-ignored, they will
+		 * most likely not want LVM to turn around and change the
+		 * ignore / un-ignore value when it writes the VG to disk.
+		 * This does not guarantee this PV's ignore bits will be
+		 * preserved in future operations.
+		 */
+		if (!is_orphan(pv) && vg_mda_copies(vg))
+			vg_set_mda_copies(vg, vg_mda_used_count(vg));
 	} else {
 		/* --uuid: Change PV ID randomly */
 		if (!id_create(&pv->id)) {

             reply	other threads:[~2010-06-28 20:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-28 20:38 wysochanski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-05-19 15:34 wysochanski
2010-05-19 13:21 wysochanski
2010-05-19 11:53 wysochanski
2008-07-31 12:40 agk

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:

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

  git send-email \ \ \ \ \

* 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).