Re: [PATCH V2 2/2] libblkid: Set BLKID_BID_FL_VERIFIED in case revalidation is not needed

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

 



On Mon, May 13, 2019 at 05:21:33PM +0300, Nikolay Borisov wrote:
> >  	    (diff < BLKID_PROBE_MIN ||
> > -		dev->bid_flags & BLKID_BID_FL_VERIFIED))
> > +		dev->bid_flags & BLKID_BID_FL_VERIFIED)) {
> > +		dev->bid_flags |= BLKID_BID_FL_VERIFIED;
> 
> Actually I think this patch is wrong because the check for
> dev->bid_flags & BLKID_BID_FL_VERIFIED should also be removed. E.g.
> BID_FL_VERIFIED should be set but check should be only diff <
> BLKID_PROBE_MIN. Otherwise if once this flag is set either due to proper
> revalidation or because not enough time has elapsed then it will never
> be reset, because the device will never be freed.

Yes, we have only one time limit there (after your first patch) than
we don't need to differentiate between in-memory and from-cache. It
should be enough to check for the time and set the flag.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux