All of lore.kernel.org
 help / color / mirror / Atom feed
From: wysochanski@sourceware.org <wysochanski@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/metadata/metadata-exporte ...
Date: 23 Apr 2008 14:33:06 -0000	[thread overview]
Message-ID: <20080423143306.7289.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski at sourceware.org	2008-04-23 14:33:06

Modified files:
	.              : WHATS_NEW 
	lib/metadata   : metadata-exported.h 
	tools          : vgsplit.c 

Log message:
	Fix vgsplit internal counting of snapshot LVs.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.859&r2=1.860
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.47&r2=1.48
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgsplit.c.diff?cvsroot=lvm2&r1=1.66&r2=1.67

--- LVM2/WHATS_NEW	2008/04/23 12:53:10	1.859
+++ LVM2/WHATS_NEW	2008/04/23 14:33:05	1.860
@@ -1,5 +1,6 @@
 Version 2.02.36 - 
 =================================
+  Fix vgsplit internal counting of snapshot LVs.
   Fix internal snapshot_count when vgmerge with snapshots in source VG.
   Simply clvmd-openais by using non-async saLckResourceLock.
   Check lv_count in vg_validate.
--- LVM2/lib/metadata/metadata-exported.h	2008/04/10 17:09:31	1.47
+++ LVM2/lib/metadata/metadata-exported.h	2008/04/23 14:33:05	1.48
@@ -202,7 +202,23 @@
 	uint32_t pv_count;
 	struct list pvs;
 
-	/* logical volumes */
+	/*
+	 * logical volumes
+	 * The following relationship should always hold:
+	 * list_size(lvs) = lv_count + 2 * snapshot_count
+	 *
+	 * Snapshots consist of 2 instances of "struct logical_volume":
+	 * - cow (lv_name is visible to the user)
+	 * - snapshot (lv_name is 'snapshotN')
+	 * Neither of these instances is reflected in lv_count, but we
+	 * multiply the snapshot_count by 2.
+	 *
+	 * Mirrors consist of multiple instances of "struct logical_volume":
+	 * - one for the mirror log
+	 * - one for each mirror leg
+	 * - one for the user-visible mirror LV
+	 * all of the instances are reflected in lv_count.
+	 */
 	uint32_t lv_count;
 	uint32_t snapshot_count;
 	struct list lvs;
--- LVM2/tools/vgsplit.c	2008/04/15 14:57:12	1.66
+++ LVM2/tools/vgsplit.c	2008/04/23 14:33:06	1.67
@@ -109,7 +109,7 @@
 	if (lv->status & SNAPSHOT) {
 		vg_from->snapshot_count--;
 		vg_to->snapshot_count++;
-	} else {
+	} else if (!lv_is_cow(lv)) {
 		vg_from->lv_count--;
 		vg_to->lv_count++;
 	}



             reply	other threads:[~2008-04-23 14:33 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-23 14:33 wysochanski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-12-01  0:09 LVM2 ./WHATS_NEW lib/metadata/metadata-exporte jbrassow
2011-10-28 20:12 zkabelac
2011-10-07 14:56 jbrassow
2011-09-14  9:57 zkabelac
2011-09-07  8:34 zkabelac
2011-08-18 19:43 jbrassow
2011-08-18 19:34 jbrassow
2011-03-11 14:56 prajnoha
2011-03-02 20:00 mbroz
2011-02-25 14:02 prajnoha
2010-05-21 14:07 zkabelac
2010-05-21 12:55 zkabelac
2010-05-21 12:52 zkabelac
2010-05-14 15:19 jbrassow
2010-03-16 15:30 agk
2010-03-16 14:37 agk
2009-07-14  2:19 wysochanski
2009-06-05 20:00 mbroz
2009-06-01 14:43 mbroz
2009-02-03 16:19 wysochanski
2009-02-03 16:58 ` Alasdair G Kergon
2008-02-13 20:01 meyering
2008-01-18 22:02 agk
2008-01-16 18:15 agk
2008-01-07 20:42 mbroz
2007-11-15  2:20 agk
2007-10-12 14:08 wysochanski
2007-09-20 21:39 wysochanski
2007-08-30 20:30 wysochanski
2007-08-21 17:38 wysochanski
2007-07-23 17:27 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=20080423143306.7289.qmail@sourceware.org \
    --to=wysochanski@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.