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

Re: [lvm-devel] [PATCH] Fix pvcreate device check.



On Mon, 2010-03-15 at 14:18 +0100, Milan Broz wrote:
> 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
> 

Ack.  Thanks for cleaning up this code wart Milan!


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