mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00: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 in4d83a6722f
but 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:
parent
6c2e34e1a7
commit
892e37d5a4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user