提交 892e37d5 编写于 作者: P Peter Krempa

qemu: hotplug: Clean up memory backing files after failed memory hotplug

Libvirt provides full path to the backing file since commit
fec8f9c4. This made qemu create the backend object but did not
delete it. This was fixed for unplug case in 4d83a672 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=1553085Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
上级 6c2e34e1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册