提交 2647a363 编写于 作者: M Michal Privoznik

qemuDomainNestedJobAllowed: Allow QEMU_JOB_NONE

https://bugzilla.redhat.com/show_bug.cgi?id=1598084

When creating a snapshot with --quiesce an async job is grabbed
and just before executing guest fs-freeze command an agent job is
grabbed. This is achieved by calling

  qemuDomainObjBeginJobInternal(job = QEMU_JOB_NONE,
                                agentJob = QEMU_AGENT_JOB_MODIFY);

Since there already is an async job set on the domain (by the
same thread) qemuDomainNestedJobAllowed(priv, job) is consulted
if @job is allowed by job mask. But this function returns false
(meaning sync @job is not allowed) which leads to a deadlock.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
上级 f7ac4f7e
...@@ -6414,7 +6414,9 @@ qemuDomainObjReleaseAsyncJob(virDomainObjPtr obj) ...@@ -6414,7 +6414,9 @@ qemuDomainObjReleaseAsyncJob(virDomainObjPtr obj)
static bool static bool
qemuDomainNestedJobAllowed(qemuDomainObjPrivatePtr priv, qemuDomainJob job) qemuDomainNestedJobAllowed(qemuDomainObjPrivatePtr priv, qemuDomainJob job)
{ {
return !priv->job.asyncJob || (priv->job.mask & JOB_MASK(job)) != 0; return !priv->job.asyncJob ||
job == QEMU_JOB_NONE ||
(priv->job.mask & JOB_MASK(job)) != 0;
} }
bool bool
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册