All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Wysochanski <dwysocha@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 2/3] Add find_vgname_from_pvname() function using lvmcache functions.
Date: Wed, 17 Mar 2010 12:50:48 -0400	[thread overview]
Message-ID: <1268844648.2476.1.camel@f10-node1> (raw)
In-Reply-To: <1268841108-19327-3-git-send-email-dwysocha@redhat.com>

On Wed, 2010-03-17 at 11:51 -0400, Dave Wysochanski wrote:
> +char *find_vgname_from_pvname(struct cmd_context *cmd, const char
> *pvname)
> +{
> +       char *vgname;
> +       struct lvmcache_info *info;
> +
> +       /*
> +        * Initially, all we have is a pv name - we don't know the VG
> name.
> +        * Try to look the name up in lvmcache.
> +        */
> +       lvmcache_label_scan(cmd, 0);
> +       vgname = lvmcache_vgname_from_pvname(cmd, pvname);
> +

Actually the lvmcache_label_scan() should not be necessary here.

We read the label for the device later and the expensive scans if
necessary (orphan and no mdas).



  parent reply	other threads:[~2010-03-17 16:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17 15:51 [PATCH 0/3] Add infrastructure for cleaner pv handling, v2 Dave Wysochanski
2010-03-17 15:51 ` [PATCH 1/3] Add a couple of lvmcache functions to aid in lookups by pvname Dave Wysochanski
2010-03-17 15:51   ` [PATCH 2/3] Add find_vgname_from_pvname() function using lvmcache functions Dave Wysochanski
2010-03-17 15:51     ` [PATCH 3/3] Update pvchange to always obtain a vg handle for each pv to process Dave Wysochanski
2010-03-17 16:50     ` Dave Wysochanski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-02-13  0:51 [PATCH 0/3] Add infrastructure for cleaner pv handling Dave Wysochanski
2010-02-13  0:51 ` [PATCH 1/3] Add a couple of lvmcache functions to aid in lookups by pvname Dave Wysochanski
2010-02-13  0:51   ` [PATCH 2/3] Add find_vgname_from_pvname() function using lvmcache functions 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=1268844648.2476.1.camel@f10-node1 \
    --to=dwysocha@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.