mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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 <berrange@redhat.com>
This commit is contained in:
parent
6ffcab65c9
commit
b46f7f4a0b
@ -158,8 +158,6 @@ struct _virQEMUDriver {
|
|||||||
|
|
||||||
virThreadPoolPtr workerPool;
|
virThreadPoolPtr workerPool;
|
||||||
|
|
||||||
unsigned int qemuVersion;
|
|
||||||
|
|
||||||
int nextvmid;
|
int nextvmid;
|
||||||
|
|
||||||
virCgroupPtr cgroup;
|
virCgroupPtr cgroup;
|
||||||
|
@ -1501,14 +1501,15 @@ cleanup:
|
|||||||
static int qemuGetVersion(virConnectPtr conn, unsigned long *version) {
|
static int qemuGetVersion(virConnectPtr conn, unsigned long *version) {
|
||||||
virQEMUDriverPtr driver = conn->privateData;
|
virQEMUDriverPtr driver = conn->privateData;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
unsigned int qemuVersion;
|
||||||
|
|
||||||
qemuDriverLock(driver);
|
qemuDriverLock(driver);
|
||||||
if (qemuCapsGetDefaultVersion(driver->caps,
|
if (qemuCapsGetDefaultVersion(driver->caps,
|
||||||
driver->capsCache,
|
driver->capsCache,
|
||||||
&driver->qemuVersion) < 0)
|
&qemuVersion) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
*version = driver->qemuVersion;
|
*version = qemuVersion;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user