[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH 2/3] Add find_vgname_from_pvname() function using lvmcache functions.



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).


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]