public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 lib/metadata/mirror.c tools/lvconvert.c
@ 2007-08-29 20:19 jbrassow
  0 siblings, 0 replies; only message in thread
From: jbrassow @ 2007-08-29 20:19 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	jbrassow@sourceware.org	2007-08-29 20:19:11

Modified files:
	lib/metadata   : mirror.c 
	tools          : lvconvert.c 

Log message:
	When mirrors are created with the --nosync option, a status flag
	(MIRROR_NOTSYNCED) is added to the LVM metadata.  This flag is
	not cleared when converting to linear.  Subsequently, if you
	up-convert the linear to a mirror, the flag remains - even though
	an up-convert will always force a complete resync.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.41&r2=1.42
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.38&r2=1.39

--- LVM2/lib/metadata/mirror.c	2007/08/22 14:38:17	1.41
+++ LVM2/lib/metadata/mirror.c	2007/08/29 20:19:11	1.42
@@ -198,6 +198,7 @@
 		extents = lv1->le_count;
 		_move_lv_segments(mirrored_seg->lv, lv1);
 		mirrored_seg->lv->status &= ~MIRRORED;
+		mirrored_seg->lv->status &= ~MIRROR_NOTSYNCED;
 		remove_log = 1;
 		/* Replace mirror with error segment */
 		segtype = get_segtype_from_string(mirrored_seg->lv->vg->cmd, "error");
--- LVM2/tools/lvconvert.c	2007/08/22 20:03:46	1.38
+++ LVM2/tools/lvconvert.c	2007/08/29 20:19:11	1.39
@@ -418,8 +418,11 @@
 
 			if (sync_percent >= 100.0)
 				init_mirror_in_sync(1);
-			else
+			else {
+				/* A full resync will take place */
+				lv->status &= ~MIRROR_NOTSYNCED;
 				init_mirror_in_sync(0);
+			}
 
 			if (!remove_mirror_images(seg, lp->mirrors,
 						  lp->pv_count ?


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-29 20:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-29 20:19 LVM2 lib/metadata/mirror.c tools/lvconvert.c jbrassow

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