mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: hotplug: Clean up memory backing files after failed memory hotplug
Libvirt provides full path to the backing file since commitfec8f9c49a. This made qemu create the backend object but did not delete it. This was fixed for unplug case in4d83a6722fbut not in case of failure to hotplug the frontend. We'd leave the files behind which would make memory unusable in case of hugepages. https://bugzilla.redhat.com/show_bug.cgi?id=1553085 Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
@@ -2212,6 +2212,10 @@ qemuDomainAttachMemory(virQEMUDriverPtr driver,
|
||||
ignore_value(qemuMonitorDelObject(priv->mon, objalias));
|
||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
||||
mem = NULL;
|
||||
|
||||
if (objAdded && mem)
|
||||
ignore_value(qemuProcessDestroyMemoryBackingPath(driver, vm, mem));
|
||||
|
||||
virErrorRestore(&orig_err);
|
||||
if (!mem)
|
||||
goto audit;
|
||||
|
||||
Reference in New Issue
Block a user