* [PATCH] Never activate hidden volumes directly in vgchange.
@ 2009-10-09 10:26 Milan Broz
2009-10-19 23:41 ` Dave Wysochanski
0 siblings, 1 reply; 2+ messages in thread
From: Milan Broz @ 2009-10-09 10:26 UTC (permalink / raw)
To: lvm-devel
Never activate hidden volumes directly in vgchange.
All hidden (not visible) volumes should be activated through
other visible volumes.
(There are already exceptions like snapshot, mirror log and image,
which should be cleaned one day...)
This solves problems for future types of hidden volumes,
which can have special meaning and must not be activated implicitly
(e.g. key store volume).
Signed-off-by: Milan Broz<mbroz@redhat.com>
---
tools/vgchange.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tools/vgchange.c b/tools/vgchange.c
index 07d5262..9445263 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -61,6 +61,9 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd,
dm_list_iterate_items(lvl,&vg->lvs) {
lv = lvl->lv;
+ if (!lv_is_visible(lv))
+ continue;
+
/* Only request activation of snapshot origin devices */
if ((lv->status& SNAPSHOT) || lv_is_cow(lv))
continue;
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH] Never activate hidden volumes directly in vgchange.
2009-10-09 10:26 [PATCH] Never activate hidden volumes directly in vgchange Milan Broz
@ 2009-10-19 23:41 ` Dave Wysochanski
0 siblings, 0 replies; 2+ messages in thread
From: Dave Wysochanski @ 2009-10-19 23:41 UTC (permalink / raw)
To: lvm-devel
On Fri, 2009-10-09 at 12:26 +0200, Milan Broz wrote:
> Never activate hidden volumes directly in vgchange.
>
> All hidden (not visible) volumes should be activated through
> other visible volumes.
>
> (There are already exceptions like snapshot, mirror log and image,
> which should be cleaned one day...)
>
> This solves problems for future types of hidden volumes,
> which can have special meaning and must not be activated implicitly
> (e.g. key store volume).
>
> Signed-off-by: Milan Broz<mbroz@redhat.com>
> ---
> tools/vgchange.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/tools/vgchange.c b/tools/vgchange.c
> index 07d5262..9445263 100644
> --- a/tools/vgchange.c
> +++ b/tools/vgchange.c
> @@ -61,6 +61,9 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd,
> dm_list_iterate_items(lvl,&vg->lvs) {
> lv = lvl->lv;
>
> + if (!lv_is_visible(lv))
> + continue;
> +
> /* Only request activation of snapshot origin devices */
> if ((lv->status& SNAPSHOT) || lv_is_cow(lv))
> continue;
>
>
Ack. Why not remove the redundant check(s) such as mirror log, etc
along with this patch?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-19 23:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-09 10:26 [PATCH] Never activate hidden volumes directly in vgchange Milan Broz
2009-10-19 23:41 ` Dave Wysochanski
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.