提交 0b4211f9 编写于 作者: J John Ferlan

qemu: Force capabilities cache refresh if libvirtd date is different

https://bugzilla.redhat.com/show_bug.cgi?id=1195882

Original commit id 'cbde3589' indicates that the cache file would be
discarded if either the QEMU binary or libvirtd 'ctime' changes; however,
the code only discarded if the QEMU binary time didn't match or if the
new libvirtd ctime was later than what created the cache file.

Since many factors come into play with 'ctime' adjustments (including
perhaps turning back the hands of time), change the logic to also force
a refresh if the ctime of libvirt is different than what's in the cache.
上级 205a6db0
......@@ -2981,9 +2981,9 @@ virQEMUCapsInitCached(virQEMUCapsPtr qemuCaps, const char *cacheDir)
goto cleanup;
}
/* Discard if cache is older that QEMU binary */
/* Discard cache if QEMU binary or libvirtd changed */
if (qemuctime != qemuCaps->ctime ||
selfctime < virGetSelfLastChanged()) {
selfctime != virGetSelfLastChanged()) {
VIR_DEBUG("Outdated cached capabilities '%s' for '%s' "
"(%lld vs %lld, %lld vs %lld)",
capsfile, qemuCaps->binary,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册