From: Daniel P. Berrange Date: Mon, 14 Jan 2013 20:04:17 +0000 (+0000) Subject: Remove pointless 'qemuVersion' field from virQEMUDriverPtr X-Git-Tag: v1.0.3-rc1~218 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b46f7f4a0b96c2d2d01d64d960bd7bc90dc16b0c;p=thirdparty%2Flibvirt.git Remove pointless 'qemuVersion' field from virQEMUDriverPtr 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 --- diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index 1cc277f698..2b27a3e5e3 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 86cdf63b51..a59f514c36 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: