From: "Daniel P. Berrange" <berra...@redhat.com> The QEMU driver struct has a 'qemuVersion' field that was previously used to cache the version lookup from capabilities. With the recent QEMU capabilities rewrite the caching happens at a lower level so this field is pointless. Removing it avoids worries about locking when updating it.
Signed-off-by: Daniel P. Berrange <berra...@redhat.com> --- src/qemu/qemu_conf.h | 2 -- src/qemu/qemu_driver.c | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index 1cc277f..2b27a3e 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -158,8 +158,6 @@ struct _virQEMUDriver { virThreadPoolPtr workerPool; - unsigned int qemuVersion; - int nextvmid; virCgroupPtr cgroup; diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d6c6af5..2d0cd77 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -1501,14 +1501,15 @@ cleanup: static int qemuGetVersion(virConnectPtr conn, unsigned long *version) { virQEMUDriverPtr driver = conn->privateData; int ret = -1; + unsigned int qemuVersion; qemuDriverLock(driver); if (qemuCapsGetDefaultVersion(driver->caps, driver->capsCache, - &driver->qemuVersion) < 0) + &qemuVersion) < 0) goto cleanup; - *version = driver->qemuVersion; + *version = qemuVersion; ret = 0; cleanup: -- 1.8.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list