mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: process: Terminate backup job on VM destroy
Commit d75f865fb989b3e6330c78c28e1c3bf7fa28e6a5 caused a job-deadlock if a VM is running the backup job and being destroyed as it removed the cleanup of the async job type and there was nothing to clean up the backup job. Add an explicit cleanup of the backup job when destroying a VM. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
bc8b159cb1
commit
5632ed8bad
@ -604,7 +604,7 @@ qemuBackupBeginCollectIncrementalCheckpoints(virDomainObjPtr vm,
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
void
|
||||
qemuBackupJobTerminate(virDomainObjPtr vm,
|
||||
qemuDomainJobStatus jobstatus)
|
||||
|
||||
|
@ -42,6 +42,9 @@ qemuBackupNotifyBlockjobEnd(virDomainObjPtr vm,
|
||||
unsigned long long end,
|
||||
int asyncJob);
|
||||
|
||||
void
|
||||
qemuBackupJobTerminate(virDomainObjPtr vm,
|
||||
qemuDomainJobStatus jobstatus);
|
||||
|
||||
int
|
||||
qemuBackupGetJobInfoStats(virQEMUDriverPtr driver,
|
||||
|
@ -57,6 +57,7 @@
|
||||
#include "qemu_security.h"
|
||||
#include "qemu_extdevice.h"
|
||||
#include "qemu_firmware.h"
|
||||
#include "qemu_backup.h"
|
||||
|
||||
#include "cpu/cpu.h"
|
||||
#include "cpu/cpu_x86.h"
|
||||
@ -7504,6 +7505,10 @@ void qemuProcessStop(virQEMUDriverPtr driver,
|
||||
virResctrlAllocRemove(vm->def->resctrls[i]->alloc);
|
||||
}
|
||||
|
||||
/* clean up a possible backup job */
|
||||
if (priv->backup)
|
||||
qemuBackupJobTerminate(vm, QEMU_DOMAIN_JOB_STATUS_CANCELED);
|
||||
|
||||
qemuProcessRemoveDomainStatus(driver, vm);
|
||||
|
||||
/* Remove VNC and Spice ports from port reservation bitmap, but only if
|
||||
|
Loading…
x
Reference in New Issue
Block a user