From: Milan Broz <mbroz@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Change process_each_lv_in_vg() iterator to only process non-hidden LVs.
Date: Fri, 16 Oct 2009 11:05:04 +0200 [thread overview]
Message-ID: <4AD83740.5070704@redhat.com> (raw)
In-Reply-To: <1255615650-3655-1-git-send-email-dwysocha@redhat.com>
On 10/15/2009 04:07 PM, Dave Wysochanski wrote:
> Unless the "--all" flag is given, the iterator functions should not be
> processing hidden LVs. I have checked all the tools and this seems to
> be how they all behave. Somehow before I missed the fact I could re-use
> the "--all" flag to qualify the hidden LV check (perhaps it's because
> the all flag is not documented well). If there are things I've overlooked
> I can deal with them in another patch. I am working on patches to clarify
> and document the usage of "--all".
Ack for the intention (see my previous patch) but nack to use of all_ARG :-)
We should really document --all first, missing in man pages
(lvs, lvdisplay, lvscan, pvs, pvdisplay, vgs)
> --- a/tools/toollib.c
> +++ b/tools/toollib.c
> @@ -122,6 +122,9 @@ int process_each_lv_in_vg(struct cmd_context *cmd,
> if (lvl->lv->status & SNAPSHOT)
> continue;
>
> + if (!lv_is_visible(lvl->lv) && !arg_count(cmd, all_ARG))
> + continue;
> +
This function is used used in process_each_lv().
If you do this and command uses all_ARG, caller can activate hidden
volumes directly (see lvchange).
But you cannot remove hidden volumes now (see lvremove, it has no all arg).
I think that
- not visible (hidden) volumes must be always be activated through some
visible LV or other operation
(I have special hidden keystore volume and I never want user to activate it
explicitly for example.)
- we should allow user to remove hidden volume (if it is unreferenced),
(like hidden orphaned mirror log when something went wrong)
- also see my previous patch for vgchange, it should be cleaned similar way
(adding exceptions for every type of hidden volume is not ideal,
lv_is_visible() seems to be ok here)
Milan
next prev parent reply other threads:[~2009-10-16 9:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-15 14:07 [PATCH] Change process_each_lv_in_vg() iterator to only process non-hidden LVs Dave Wysochanski
2009-10-16 9:05 ` Milan Broz [this message]
2009-10-19 23:17 ` Dave Wysochanski
2009-10-21 3:58 ` [PATCH] Document --all option in man pages, cleanup lvdisplay/pvdisplay man page Dave Wysochanski
2009-10-21 12:51 ` Alasdair G Kergon
2009-10-21 16:04 ` 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=4AD83740.5070704@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.