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

Revert hack for autodestroy in qemuProcessStop

This reverts the hack done in

commit 568a6cda
Author: Jiri Denemark <jdenemar@redhat.com>
Date:   Fri Feb 15 15:11:47 2013 +0100

    qemu: Avoid deadlock in autodestroy

since we now have a fix which avoids the deadlock scenario
entirely
上级 96b893f0
......@@ -254,10 +254,6 @@ struct qemuDomainDiskInfo {
int io_status;
};
/*
* To avoid a certain deadlock this callback must never call any
* virQEMUCloseCallbacks* API.
*/
typedef virDomainObjPtr (*virQEMUCloseCallback)(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virConnectPtr conn);
......
......@@ -138,7 +138,6 @@ struct _qemuDomainObjPrivate {
bool gotShutdown;
bool beingDestroyed;
bool autoDestroyed;
char *pidfile;
int nvcpupids;
......
......@@ -4232,8 +4232,7 @@ void qemuProcessStop(virQEMUDriverPtr driver,
qemuDomainCleanupRun(driver, vm);
/* Stop autodestroy in case guest is restarted */
if (!priv->autoDestroyed)
qemuProcessAutoDestroyRemove(driver, vm);
qemuProcessAutoDestroyRemove(driver, vm);
/* now that we know it's stopped call the hook if present */
if (virHookPresent(VIR_HOOK_DRIVER_QEMU)) {
......@@ -4614,13 +4613,8 @@ qemuProcessAutoDestroy(virQEMUDriverPtr driver,
VIR_DEBUG("Killing domain");
/* We need to prevent qemuProcessStop from removing this function from
* closeCallbacks since that would cause a deadlock.
*/
priv->autoDestroyed = true;
qemuProcessStop(driver, dom, VIR_DOMAIN_SHUTOFF_DESTROYED,
VIR_QEMU_PROCESS_STOP_MIGRATED);
priv->autoDestroyed = false;
virDomainAuditStop(dom, "destroyed");
event = virDomainEventNewFromObj(dom,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册