All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Never activate hidden volumes directly in vgchange.
Date: Fri, 09 Oct 2009 12:26:39 +0200	[thread overview]
Message-ID: <4ACF0FDF.7080705@redhat.com> (raw)

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;




             reply	other threads:[~2009-10-09 10:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09 10:26 Milan Broz [this message]
2009-10-19 23:41 ` [PATCH] Never activate hidden volumes directly in vgchange Dave 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=4ACF0FDF.7080705@redhat.com \
    --to=mbroz@redhat.com \
    --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.