* [PATCH] Fix vgchange for sparse devices
@ 2011-05-19 16:37 Mikulas Patocka
0 siblings, 0 replies; 3+ messages in thread
From: Mikulas Patocka @ 2011-05-19 16:37 UTC (permalink / raw)
To: lvm-devel
Fix vgchange for sparse devices
If we create a sparse snapshot volume with "lvcreate --virtualsize", the volume
is not activated or deactivated with vgchange.
This patch fixes it so that vgchange activates and deactivates such volumes.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
---
tools/vgchange.c | 4 ++++
1 file changed, 4 insertions(+)
Index: LVM2.2.02.85/tools/vgchange.c
===================================================================
--- LVM2.2.02.85.orig/tools/vgchange.c 2011-05-19 17:41:17.000000000 +0200
+++ LVM2.2.02.85/tools/vgchange.c 2011-05-19 18:32:00.000000000 +0200
@@ -96,6 +96,10 @@ static int _activate_lvs_in_vg(struct cm
if (!lv_is_visible(lv))
continue;
+ /* If LV is sparse, activate origin instead */
+ if (lv_is_cow(lv) && lv_is_virtual_origin(origin_from_cow(lv)))
+ lv = origin_from_cow(lv);
+
/* Only request activation of snapshot origin devices */
if ((lv->status & SNAPSHOT) || lv_is_cow(lv))
continue;
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Fix vgchange for sparse devices
@ 2011-10-25 13:03 Mikulas Patocka
2011-10-25 13:34 ` Milan Broz
0 siblings, 1 reply; 3+ messages in thread
From: Mikulas Patocka @ 2011-10-25 13:03 UTC (permalink / raw)
To: lvm-devel
Fix vgchange for sparse devices
If we create a sparse snapshot volume with "lvcreate --virtualsize", the volume
is not activated or deactivated with vgchange.
This patch fixes it so that vgchange activates and deactivates such volumes.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
---
tools/vgchange.c | 4 ++++
1 file changed, 4 insertions(+)
Index: LVM2.2.02.85/tools/vgchange.c
===================================================================
--- LVM2.2.02.85.orig/tools/vgchange.c 2011-05-19 17:41:17.000000000 +0200
+++ LVM2.2.02.85/tools/vgchange.c 2011-05-19 18:32:00.000000000 +0200
@@ -96,6 +96,10 @@ static int _activate_lvs_in_vg(struct cm
if (!lv_is_visible(lv))
continue;
+ /* If LV is sparse, activate origin instead */
+ if (lv_is_cow(lv) && lv_is_virtual_origin(origin_from_cow(lv)))
+ lv = origin_from_cow(lv);
+
/* Only request activation of snapshot origin devices */
if ((lv->status & SNAPSHOT) || lv_is_cow(lv))
continue;
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Fix vgchange for sparse devices
2011-10-25 13:03 [PATCH] Fix vgchange for sparse devices Mikulas Patocka
@ 2011-10-25 13:34 ` Milan Broz
0 siblings, 0 replies; 3+ messages in thread
From: Milan Broz @ 2011-10-25 13:34 UTC (permalink / raw)
To: lvm-devel
On 10/25/2011 03:03 PM, Mikulas Patocka wrote:
> Fix vgchange for sparse devices
>
> If we create a sparse snapshot volume with "lvcreate --virtualsize", the volume
> is not activated or deactivated with vgchange.
this is already in tree btw.
But there are several problems with virtual origins because it was never properly implemented.
https://bugzilla.redhat.com/show_bug.cgi?id=733522
https://bugzilla.redhat.com/show_bug.cgi?id=738435
Milan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-25 13:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25 13:03 [PATCH] Fix vgchange for sparse devices Mikulas Patocka
2011-10-25 13:34 ` Milan Broz
-- strict thread matches above, loose matches on Subject: below --
2011-05-19 16:37 Mikulas Patocka
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.