public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: wysochanski@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2/lib/metadata metadata-exported.h metadata.c
Date: Tue, 29 Jun 2010 22:41:00 -0000	[thread overview]
Message-ID: <20100629224130.11131.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2010-06-29 22:41:29

Modified files:
	lib/metadata   : metadata-exported.h metadata.c 

Log message:
	Improve logging for setting --vgmetadatacopies.
	
	Example of logging:
	metadata/metadata.c:1127     Setting mda_copies = 3 on vg vgtest
	metadata/pv_manip.c:296         /dev/loop2 0:      0     25: NULL(0:0)
	metadata/pv_manip.c:296         /dev/loop3 0:      0     25: NULL(0:0)
	metadata/pv_manip.c:296         /dev/loop4 0:      0     25: NULL(0:0)
	metadata/metadata.c:1072     Adjusting ignored mdas on vg vgtest, vg_mda_used_count=5, vg_mda_copies=3
	metadata/metadata.c:1015     Setting ignore flag for 2 mdas on vg vgtest
	metadata/metadata.c:4151     Setting mda ignored flag for metadata_locn /dev/loop2.
	metadata/metadata.c:4151     Setting mda ignored flag for metadata_locn /dev/loop3.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.159&r2=1.160
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.366&r2=1.367

--- LVM2/lib/metadata/metadata-exported.h	2010/06/29 21:32:44	1.159
+++ LVM2/lib/metadata/metadata-exported.h	2010/06/29 22:41:28	1.160
@@ -886,7 +886,7 @@
 #define VGMETADATACOPIES_ALL UINT32_MAX
 #define VGMETADATACOPIES_UNMANAGED 0
 uint32_t vg_mda_copies(const struct volume_group *vg);
-int vg_set_mda_copies(struct volume_group *vg, uint32_t value);
+int vg_set_mda_copies(struct volume_group *vg, uint32_t copies);
 int vg_check_write_mode(struct volume_group *vg);
 #define vg_is_clustered(vg) (vg_status((vg)) & CLUSTERED)
 #define vg_is_exported(vg) (vg_status((vg)) & EXPORTED_VG)
--- LVM2/lib/metadata/metadata.c	2010/06/29 22:37:32	1.366
+++ LVM2/lib/metadata/metadata.c	2010/06/29 22:41:28	1.367
@@ -1011,6 +1011,8 @@
 {
 	struct metadata_area *mda;
 
+	log_verbose("Setting ignore flag for %"PRIu32" mdas on vg %s",
+		    num_to_ignore, vg->name);
 	if (!num_to_ignore)
 		return 1;
 	/* FIXME: flip bits on random mdas */
@@ -1031,6 +1033,8 @@
 {
 	struct metadata_area *mda, *tmda;
 
+	log_verbose("Clearing ignore flag for %"PRIu32" mdas on vg %s",
+		    num_to_unignore, vg->name);
 	if (!num_to_unignore)
 		return 1;
 	/* FIXME: flip bits on random mdas */
@@ -1063,6 +1067,9 @@
 	int ret = 1;
 
 	mda_copies = vg_mda_used_count(vg);
+	log_verbose("Adjusting ignored mdas on vg %s, vg_mda_used_count=%"
+		    PRIu32", vg_mda_copies=%"PRIu32,
+		    vg->name, mda_copies, vg_mda_copies(vg));
 	if (vg->mda_copies == VGMETADATACOPIES_UNMANAGED)
 		goto skip_adjust;
 
@@ -1108,14 +1115,16 @@
 	return vg->mda_copies;
 }
 
-int vg_set_mda_copies(struct volume_group *vg, uint32_t value)
+int vg_set_mda_copies(struct volume_group *vg, uint32_t copies)
 {
 	/* FIXME: add checks, etc, and set the value */
 	/*
 	 * FIXME: Before we set a larger value, we may need to
 	 * enable some mdas on PVS
 	 */
-	vg->mda_copies = value;
+	vg->mda_copies = copies;
+	log_verbose("Setting mda_copies = %"PRIu32" on vg %s",
+		    copies, vg->name);
 	return 1;
 }
 


             reply	other threads:[~2010-06-29 22:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29 22:41 wysochanski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-06-28 20:36 wysochanski
2010-05-19 11:52 wysochanski
2010-04-13 17:26 wysochanski
2009-07-26  2:02 wysochanski
2009-07-26  1:53 wysochanski
2009-07-15 17:26 agk
2009-07-15  6:10 mornfall
2009-07-10 21:19 wysochanski
2009-07-08 14:31 wysochanski
2009-07-08 14:28 wysochanski
2009-06-09 14:29 wysochanski
2009-01-27  1:48 agk
2009-01-27  0:40 agk
2009-01-26 22:13 agk
2008-03-13 22:51 wysochanski

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=20100629224130.11131.qmail@sourceware.org \
    --to=wysochanski@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).