public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: mbroz@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW lib/metadata/snapshot_manip.c
Date: Wed, 13 May 2009 21:25:00 -0000 [thread overview]
Message-ID: <20090513212546.27791.qmail@sourceware.org> (raw)
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;
}
reply other threads:[~2009-05-13 21:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20090513212546.27791.qmail@sourceware.org \
--to=mbroz@sourceware.org \
--cc=lvm-devel@redhat.com \
--cc=lvm2-cvs@sourceware.org \
/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 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).