All of lore.kernel.org
 help / color / mirror / Atom feed
From: mbroz@sourceware.org <mbroz@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/format_text/import_vsn1.c
Date: 9 Jul 2009 11:29:42 -0000	[thread overview]
Message-ID: <20090709112942.25123.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz at sourceware.org	2009-07-09 11:29:41

Modified files:
	.              : WHATS_NEW 
	lib/format_text: import_vsn1.c 

Log message:
	Fix and precise metadata read errors for segment areas.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1172&r2=1.1173
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import_vsn1.c.diff?cvsroot=lvm2&r1=1.62&r2=1.63

--- LVM2/WHATS_NEW	2009/07/09 11:29:00	1.1172
+++ LVM2/WHATS_NEW	2009/07/09 11:29:41	1.1173
@@ -1,5 +1,6 @@
 Version 2.02.49 - 
 ================================
+  Fix and precise metadata read errors for segment areas.
   Fix segment metadata read function errors to use proper segment name.
   Add parent node to config_node structure.
   Fix segment import functions to print segment name and logical volume name.
--- LVM2/lib/format_text/import_vsn1.c	2009/07/09 11:28:10	1.62
+++ LVM2/lib/format_text/import_vsn1.c	2009/07/09 11:29:41	1.63
@@ -377,32 +377,29 @@
 	unsigned int s;
 	struct config_value *cv;
 	struct logical_volume *lv1;
-	const char *seg_name = sn->key;
+	struct physical_volume *pv;
+	const char *seg_name = config_parent_name(sn);
 
 	if (!seg->area_count) {
-		log_error("Zero areas not allowed for segment '%s'", sn->key);
+		log_error("Zero areas not allowed for segment %s", seg_name);
 		return 0;
 	}
 
 	for (cv = cn->v, s = 0; cv && s < seg->area_count; s++, cv = cv->next) {
 
 		/* first we read the pv */
-		const char *bad = "Badly formed areas array for "
-		    "segment '%s'.";
-		struct physical_volume *pv;
-
 		if (cv->type != CFG_STRING) {
-			log_error(bad, sn->key);
+			log_error("Bad volume name in areas array for segment %s.", seg_name);
 			return 0;
 		}
 
 		if (!cv->next) {
-			log_error(bad, sn->key);
+			log_error("Missing offset in areas array for segment %s.", seg_name);
 			return 0;
 		}
 
 		if (cv->next->type != CFG_INT) {
-			log_error(bad, sn->key);
+			log_error("Bad offset in areas array for segment %s.", seg_name);
 			return 0;
 		}
 



             reply	other threads:[~2009-07-09 11:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09 11:29 mbroz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-25 21:43 LVM2 ./WHATS_NEW lib/format_text/import_vsn1.c zkabelac
2011-12-21 12:49 zkabelac
2011-10-23 16:05 zkabelac
2010-03-31 17:20 mbroz
2009-07-09 11:28 mbroz
2009-03-09 15:42 wysochanski
2007-11-04 15:43 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:
  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=20090709112942.25123.qmail@sourceware.org \
    --to=mbroz@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.