Revert hack for autodestroy in qemuProcessStop
This reverts the hack done in commit 568a6cda277f04ab9baaeb97490e548b7b608aa6 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
This commit is contained in:
parent
96b893f092
commit
9c4ecb3e8e
@ -254,10 +254,6 @@ struct qemuDomainDiskInfo {
|
|||||||
int io_status;
|
int io_status;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* To avoid a certain deadlock this callback must never call any
|
|
||||||
* virQEMUCloseCallbacks* API.
|
|
||||||
*/
|
|
||||||
typedef virDomainObjPtr (*virQEMUCloseCallback)(virQEMUDriverPtr driver,
|
typedef virDomainObjPtr (*virQEMUCloseCallback)(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virConnectPtr conn);
|
virConnectPtr conn);
|
||||||
|
@ -138,7 +138,6 @@ struct _qemuDomainObjPrivate {
|
|||||||
|
|
||||||
bool gotShutdown;
|
bool gotShutdown;
|
||||||
bool beingDestroyed;
|
bool beingDestroyed;
|
||||||
bool autoDestroyed;
|
|
||||||
char *pidfile;
|
char *pidfile;
|
||||||
|
|
||||||
int nvcpupids;
|
int nvcpupids;
|
||||||
|
@ -4232,8 +4232,7 @@ void qemuProcessStop(virQEMUDriverPtr driver,
|
|||||||
qemuDomainCleanupRun(driver, vm);
|
qemuDomainCleanupRun(driver, vm);
|
||||||
|
|
||||||
/* Stop autodestroy in case guest is restarted */
|
/* 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 */
|
/* now that we know it's stopped call the hook if present */
|
||||||
if (virHookPresent(VIR_HOOK_DRIVER_QEMU)) {
|
if (virHookPresent(VIR_HOOK_DRIVER_QEMU)) {
|
||||||
@ -4614,13 +4613,8 @@ qemuProcessAutoDestroy(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
VIR_DEBUG("Killing domain");
|
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,
|
qemuProcessStop(driver, dom, VIR_DOMAIN_SHUTOFF_DESTROYED,
|
||||||
VIR_QEMU_PROCESS_STOP_MIGRATED);
|
VIR_QEMU_PROCESS_STOP_MIGRATED);
|
||||||
priv->autoDestroyed = false;
|
|
||||||
|
|
||||||
virDomainAuditStop(dom, "destroyed");
|
virDomainAuditStop(dom, "destroyed");
|
||||||
event = virDomainEventNewFromObj(dom,
|
event = virDomainEventNewFromObj(dom,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user