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

Re: [lvm-devel] [PATCH] Update vgcreate and vgextend to allow uninitialized devices as input.



On Sun, Nov 30, 2008 at 02:11:13PM -0500, Dave Wysochanski wrote:
> +int pvcreate_devices(struct cmd_context *cmd, int pv_count, char **pv_names)

Can that hook instead into vg_extend() to replace the error message?
Current explicit PV functionality needs to become handled implicitly
throughout the code, rather than "do all the PV things" then "do all the
VG things".

Currently:
  vgcreate = { create empty vg; vgextend; }

int vg_extend(struct volume_group *vg, int pv_count, char **pv_names)
{
...
        /* attach each pv */
        for (i = 0; i < pv_count; i++) {
                if (!(pv = pv_by_path(vg->fid->fmt->cmd, pv_names[i]))) {
                        log_error("%s not identified as an existing "
                                  "physical volume", pv_names[i]);
                        goto bad;
                }
                
Alasdair
-- 
agk redhat com


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