public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/metadata/snapshot_manip.c
@ 2009-05-13 21:25 mbroz
  0 siblings, 0 replies; only message in thread
From: mbroz @ 2009-05-13 21:25 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz@sourceware.org	2009-05-13 21:25:46

Modified files:
	.              : WHATS_NEW 
	lib/metadata   : snapshot_manip.c 

Log message:
	Fix lv_is_visible to handle virtual origin.
	
	Snapshot is visible if its origin is marked visible,
	or if the origin is virtual.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1106&r2=1.1107
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/snapshot_manip.c.diff?cvsroot=lvm2&r1=1.38&r2=1.39

--- LVM2/WHATS_NEW	2009/05/13 21:25:01	1.1106
+++ LVM2/WHATS_NEW	2009/05/13 21:25:45	1.1107
@@ -1,5 +1,6 @@
 Version 2.02.46 - 
 ================================
+  Fix lv_is_visible to handle virtual origin.
   Introduce link_lv_to_vg and unlink_lv_from_vg functions.
   Remove lv_count from VG and use counter function instead.
   Fix snapshot segment import to not use duplicate segments & replace.
--- LVM2/lib/metadata/snapshot_manip.c	2009/05/13 21:22:57	1.38
+++ LVM2/lib/metadata/snapshot_manip.c	2009/05/13 21:25:46	1.39
@@ -30,8 +30,15 @@
 
 int lv_is_visible(const struct logical_volume *lv)
 {
-	if (lv_is_cow(lv))
-		return lv_is_visible(find_cow(lv)->lv);
+	if (lv->status & SNAPSHOT)
+		return 0;
+
+	if (lv_is_cow(lv)) {
+		if (lv_is_virtual_origin(origin_from_cow(lv)))
+			return 1;
+
+		return lv_is_visible(origin_from_cow(lv));
+	}
 
 	return lv->status & VISIBLE_LV ? 1 : 0;
 }


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

only message in thread, other threads:[~2009-05-13 21:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-13 21:25 LVM2 ./WHATS_NEW lib/metadata/snapshot_manip.c mbroz

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