Re: [PATCH 3/4] Cache result of QEMU capabilities extraction

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

 



On 03/05/2014 01:40 PM, Guido Günther wrote:
> Hi Daniel,
> On Wed, Mar 05, 2014 at 05:53:53PM +0000, Daniel P. Berrange wrote:
> [..snip..] 
>> +    /* Discard if cache is older that QEMU binary */
>> +    /* XXX must also compare to libvirtd timestamp  */
>> +    if (sb.st_mtime < qemuCaps->mtime) {
> I think looking at the mtime isn't sufficent here. Tools like dpkg set
> the mtime to the time the package was built at not the installation time
> so we might end up updating qemu but still having an mtime older than
> the time the xml was created (same holds for downgrades to older qemu
> versions) or are we simply requiring distributors to clean the cache
> upon package upgrades (which would mandate using a trigger)?

ctime is better than mtime, because ctime can't be faked.  On the other
hand, ctime changes in more situations than mtime (chmod, anyone?) - but
then again, any time ctime changes, we probably DO want to retest (a
chmod may change our ability to execute a given binary).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]