All of lore.kernel.org
 help / color / mirror / Atom feed
From: agk@sourceware.org <agk@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 lib/metadata/lv_manip.c lib/metadata/meta ...
Date: 17 Jan 2008 13:54:06 -0000	[thread overview]
Message-ID: <20080117135406.3934.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk at sourceware.org	2008-01-17 13:54:05

Modified files:
	lib/metadata   : lv_manip.c metadata-exported.h mirror.c 
	tools          : vgreduce.c 

Log message:
	rename lv_remap_error

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.143&r2=1.144
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.38&r2=1.39
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.61&r2=1.62
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgreduce.c.diff?cvsroot=lvm2&r1=1.74&r2=1.75

--- LVM2/lib/metadata/lv_manip.c	2008/01/17 13:13:54	1.143
+++ LVM2/lib/metadata/lv_manip.c	2008/01/17 13:54:05	1.144
@@ -461,7 +461,7 @@
 /*
  * Empty an LV and add error segment.
  */
-int lv_remap_error(struct logical_volume *lv)
+int replace_lv_with_error_segment(struct logical_volume *lv)
 {
 	uint32_t len = lv->le_count;
 
--- LVM2/lib/metadata/metadata-exported.h	2008/01/17 13:13:54	1.38
+++ LVM2/lib/metadata/metadata-exported.h	2008/01/17 13:54:05	1.39
@@ -379,7 +379,7 @@
 int lv_empty(struct logical_volume *lv);
 
 /* Empty an LV and add error segment */
-int lv_remap_error(struct logical_volume *lv);
+int replace_lv_with_error_segment(struct logical_volume *lv);
 
 /* Entry point for all LV extent allocations */
 int lv_extend(struct logical_volume *lv,
--- LVM2/lib/metadata/mirror.c	2008/01/17 13:37:51	1.61
+++ LVM2/lib/metadata/mirror.c	2008/01/17 13:54:05	1.62
@@ -521,7 +521,7 @@
 		_remove_mirror_log(mirrored_seg);
 		lv->status &= ~MIRRORED;
 		lv->status &= ~MIRROR_NOTSYNCED;
-		if (!lv_remap_error(lv))
+		if (!replace_lv_with_error_segment(lv))
 			return_0;
 		remove_log = 1;
 	} else if (remove_log)
@@ -616,7 +616,7 @@
 			/* Some mirrors are removed from the temporary mirror,
 			 * but the temporary layer still exists.
 			 * Down the stack and retry for remainder. */
-			next_lv = find_tmp_mirror(next_lv);
+			next_lv = find_temporary_mirror(next_lv);
 		}
 
 		num_removed -= r;
--- LVM2/tools/vgreduce.c	2008/01/17 13:13:54	1.74
+++ LVM2/tools/vgreduce.c	2008/01/17 13:54:05	1.75
@@ -54,7 +54,6 @@
 	struct list *snh, *snht;
 	struct logical_volume *cow;
 	struct lv_list *lvl;
-	uint32_t extents;
 	struct lvinfo info;
 	int first = 1;
 
@@ -116,19 +115,10 @@
 	 * the mirrored LV also should be cleaned up.
 	 * Clean-up is currently done by caller (_make_vg_consistent()).
 	 */
-	if ((lv_info(cmd, lv, &info, 0, 0) && info.exists)
-	    || find_mirror_seg(first_seg(lv))) {
-		extents = lv->le_count;
-		if (!lv_empty(lv)) {
-			stack;
-			return 0;
-		}
-		if (!lv_add_virtual_segment(lv, 0, extents,
-					    get_segtype_from_string(cmd,
-								    "error"))) {
-			stack;
-			return 0;
-		}
+	if ((lv_info(cmd, lv, &info, 0, 0) && info.exists) ||
+	    find_mirror_seg(first_seg(lv))) {
+		if (!replace_lv_with_error_segment(lv))
+			return_0;
 
 		if (!(lvl = dm_pool_alloc(cmd->mem, sizeof(*lvl)))) {
 			log_error("lv_list alloc failed");



             reply	other threads:[~2008-01-17 13:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-17 13:54 agk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-04-06 21:32 LVM2 lib/metadata/lv_manip.c lib/metadata/meta jbrassow
2011-04-07 12:09 ` Zdenek Kabelac
2011-04-07 15:20   ` Jonathan Brassow
2011-04-07 20:35     ` Zdenek Kabelac
2011-04-07 21:36       ` Jonathan Brassow
2009-07-26  2:33 wysochanski
2008-08-05 12:05 zkabelac
2008-01-17 13:13 agk
2007-12-20 22:37 agk
2007-10-11 19:20 wysochanski
2007-09-24 21:30 wysochanski
2007-08-21 16:40 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=20080117135406.3934.qmail@sourceware.org \
    --to=agk@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.