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@redhat.com>
virThreadPoolPtr workerPool;
- unsigned int qemuVersion;
-
int nextvmid;
virCgroupPtr cgroup;
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: