From: "Daniel P. Berrange" <berrange(a)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 <berrange(a)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 0403602..25bdae0 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1502,14 +1502,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.0.2