Re: libblkid: Idea to force given cached entry to be invalidated?

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

 



On Thu, Apr 17, 2014 at 09:17:03AM +0800, Qu Wenruo wrote:
> But after some tests, it seems that the ctime/mtime based cache seems not
> perfect due to the fact that multiple

Yes, the cache is not perfect -- it was originally introduced by Ted
in time when things was less complicated :-) The current goal is to
avoid the cache usage, so we have low-level API in libblkid to bypass
the cache at all, and in userspace we use this API or udev db. I guess
that many users have the cache empty, because it's unnecessary for
fsck, mount, lsblk, findmnt, systemd etc.

> device file can be created in different fs with same major/minor number.
> especially each of them has individual ctime/mtime timestamp.
> 
> So if someone (maybe insane) use mknod to create as block device file and
> use 'btrfs dev del' on the newly created
> block device file, libblkid will still be unable to detect the change since
> the ctime/mtime of block device file in /dev/
> does not change.

Not sure if I understand, it would be nice to have complete example.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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