提交 7371ca5c 编写于 作者: J Jiri Denemark

qemu: Use proper async job to refresh virtio channels

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 e893d3ca
...@@ -6237,7 +6237,8 @@ qemuMigrationFinish(virQEMUDriverPtr driver, ...@@ -6237,7 +6237,8 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
if (qemuMigrationStopNBDServer(driver, vm, mig) < 0) if (qemuMigrationStopNBDServer(driver, vm, mig) < 0)
goto endjob; goto endjob;
if (qemuRefreshVirtioChannelState(driver, vm) < 0) if (qemuRefreshVirtioChannelState(driver, vm,
QEMU_ASYNC_JOB_MIGRATION_IN) < 0)
goto endjob; goto endjob;
if ((rc = qemuConnectAgent(driver, vm)) < 0) { if ((rc = qemuConnectAgent(driver, vm)) < 0) {
......
...@@ -1974,13 +1974,16 @@ qemuProcessRefreshChannelVirtioState(virQEMUDriverPtr driver, ...@@ -1974,13 +1974,16 @@ qemuProcessRefreshChannelVirtioState(virQEMUDriverPtr driver,
int int
qemuRefreshVirtioChannelState(virQEMUDriverPtr driver, qemuRefreshVirtioChannelState(virQEMUDriverPtr driver,
virDomainObjPtr vm) virDomainObjPtr vm,
qemuDomainAsyncJob asyncJob)
{ {
qemuDomainObjPrivatePtr priv = vm->privateData; qemuDomainObjPrivatePtr priv = vm->privateData;
virHashTablePtr info = NULL; virHashTablePtr info = NULL;
int ret = -1; int ret = -1;
qemuDomainObjEnterMonitor(driver, vm); if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
goto cleanup;
ret = qemuMonitorGetChardevInfo(priv->mon, &info); ret = qemuMonitorGetChardevInfo(priv->mon, &info);
if (qemuDomainObjExitMonitor(driver, vm) < 0) if (qemuDomainObjExitMonitor(driver, vm) < 0)
ret = -1; ret = -1;
...@@ -3312,7 +3315,7 @@ qemuProcessReconnect(void *opaque) ...@@ -3312,7 +3315,7 @@ qemuProcessReconnect(void *opaque)
if (qemuProcessRefreshDisks(driver, obj, QEMU_ASYNC_JOB_NONE) < 0) if (qemuProcessRefreshDisks(driver, obj, QEMU_ASYNC_JOB_NONE) < 0)
goto error; goto error;
if (qemuRefreshVirtioChannelState(driver, obj) < 0) if (qemuRefreshVirtioChannelState(driver, obj, QEMU_ASYNC_JOB_NONE) < 0)
goto error; goto error;
/* If querying of guest's RTC failed, report error, but do not kill the domain. */ /* If querying of guest's RTC failed, report error, but do not kill the domain. */
......
...@@ -180,7 +180,8 @@ int qemuProcessSetupIOThread(virDomainObjPtr vm, ...@@ -180,7 +180,8 @@ int qemuProcessSetupIOThread(virDomainObjPtr vm,
virDomainIOThreadIDDefPtr iothread); virDomainIOThreadIDDefPtr iothread);
int qemuRefreshVirtioChannelState(virQEMUDriverPtr driver, int qemuRefreshVirtioChannelState(virQEMUDriverPtr driver,
virDomainObjPtr vm); virDomainObjPtr vm,
qemuDomainAsyncJob asyncJob);
int qemuProcessRefreshBalloonState(virQEMUDriverPtr driver, int qemuProcessRefreshBalloonState(virQEMUDriverPtr driver,
virDomainObjPtr vm, virDomainObjPtr vm,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册