diff --git a/WHATS_NEW b/WHATS_NEW index 9bf8699b7..680879dc0 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.118 - ================================= + Don't do a full read of VG when creating a new VG with an existing name. Reduce number of VG metadata parsing when looking for vgname on a PV. Avoid reparsing same metadata when reading same metadata from multiple PVs. Save extra device open/close when scanning device for size. diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index 57066a5b5..f495bdd32 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -1009,7 +1009,6 @@ struct volume_group *vg_create(struct cmd_context *cmd, const char *vg_name) .context.vg_ref.vg_name = vg_name }; struct format_instance *fid; - int consistent = 0; uint32_t rc; if (!validate_name(vg_name)) { @@ -1023,15 +1022,6 @@ struct volume_group *vg_create(struct cmd_context *cmd, const char *vg_name) /* NOTE: let caller decide - this may be check for existence */ return _vg_make_handle(cmd, NULL, rc); - /* FIXME: Is this vg_read_internal necessary? Move it inside - vg_lock_newname? */ - /* is this vg name already in use ? */ - if ((vg = vg_read_internal(cmd, vg_name, NULL, WARN_PV_READ, &consistent))) { - log_error("A volume group called '%s' already exists.", vg_name); - unlock_and_release_vg(cmd, vg, vg_name); - return _vg_make_handle(cmd, NULL, FAILED_EXIST); - } - /* Strip dev_dir if present */ vg_name = strip_dir(vg_name, cmd->dev_dir);