[Libguestfs] [PATCH RFC] blkid: start using libblkid directly instead

Karel Zak kzak at redhat.com
Wed Feb 15 11:40:58 UTC 2012


On Wed, Feb 15, 2012 at 10:03:15AM +0000, Richard W.M. Jones wrote:
> Karel, on a related topic, does libblkid always ignore the cache
> (/run/blkid/blkid.tab etc)?
> 
> We go to some length to disable the cache in libguestfs, eg. calling
> blkid -c /dev/null and/or blkid -p (this has to work on RHEL 5 which
> didn't have the -p option).
> 
> Basically we never want the cache, we always want (lib)blkid to probe
> the disk directly.

 1) the low-level part of the library (blkid_probe_* functions and "blkid
    -p") does not use the cache at all.

 2) the "blkid -c /dev/null" is a workaround for high-level part if the
    library.

IMHO for libguestfs is the best to use "1)" and on old systems with old
libblkid from e2fsprogs use "2)".


See also:
http://karelzak.blogspot.com/2012/02/libblkid-maintainers-brain-dump.html

    Karel

-- 
 Karel Zak  <kzak at redhat.com>
 http://karelzak.blogspot.com




More information about the Libguestfs mailing list