提交 b46f7f4a 编写于 作者: D Daniel P. Berrange

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: NDaniel P. Berrange <berrange@redhat.com>
上级 6ffcab65
......@@ -158,8 +158,6 @@ struct _virQEMUDriver {
virThreadPoolPtr workerPool;
unsigned int qemuVersion;
int nextvmid;
virCgroupPtr cgroup;
......
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册