提交 c6db2730 编写于 作者: P Peter Krempa

qemu: blockjob: Mark job as started only when it's new

Switching a block job to some states (e.g. QEMU_BLOCKJOB_STATE_READY)
might not require a job, thus if it will become ready asynchronously we
should not overwrite the state any more.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 8d5df644
......@@ -149,7 +149,8 @@ qemuBlockJobDiskGetJob(virDomainDiskDefPtr disk)
void
qemuBlockJobStarted(qemuBlockJobDataPtr job)
{
job->state = QEMU_BLOCKJOB_STATE_RUNNING;
if (job->state == QEMU_BLOCKJOB_STATE_NEW)
job->state = QEMU_BLOCKJOB_STATE_RUNNING;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册