mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 07:42:56 +00:00
qemu: hotplug: Clean up memory backing files after failed memory hotplug
Libvirt provides full path to the backing file since commit fec8f9c49afb479f6. This made qemu create the backend object but did not delete it. This was fixed for unplug case in 4d83a6722f 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));
|
ignore_value(qemuMonitorDelObject(priv->mon, objalias));
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
||||||
mem = NULL;
|
mem = NULL;
|
||||||
|
|
||||||
|
if (objAdded && mem)
|
||||||
|
ignore_value(qemuProcessDestroyMemoryBackingPath(driver, vm, mem));
|
||||||
|
|
||||||
virErrorRestore(&orig_err);
|
virErrorRestore(&orig_err);
|
||||||
if (!mem)
|
if (!mem)
|
||||||
goto audit;
|
goto audit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user