[lvm-devel] [PATCH] Fix pvcreate device check.
Milan Broz
mbroz at redhat.com
Mon Mar 15 13:18:17 UTC 2010
On 03/15/2010 02:14 PM, Milan Broz wrote:
> @@ -1294,17 +1294,9 @@ static int pvcreate_check(struct cmd_context *cmd, const char *name,
>
> /* Is there an md superblock here? */
> if (!dev && md_filtering()) {
> - unlock_vg(cmd, VG_ORPHANS);
> -
> - persistent_filter_wipe(cmd->filter);
> - lvmcache_destroy(cmd, 1);
> -
> + refresh_filters(cmd);
> init_md_filtering(0);
> - if (!lock_vol(cmd, VG_ORPHANS, LCK_VG_WRITE)) {
> - log_error("Can't get lock for orphan PVs");
> - init_md_filtering(1);
> - return 0;
> - }
> + lvmcache_label_scan(cmd, 0);
even this rescan line is not needed, device must be in cache already,
just it is filtered out by MD filter.
Milan
More information about the lvm-devel
mailing list