mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-12 12:55:46 +00:00
qemu: Restore resctrl alloc data after restart
During reconnect we need to reconstruct the paths of all cachetunes so that they get cleaned up when the domain is stopped. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
b9ceacba7c
commit
6c44013b17
@ -77,6 +77,7 @@
|
|||||||
#include "configmake.h"
|
#include "configmake.h"
|
||||||
#include "nwfilter_conf.h"
|
#include "nwfilter_conf.h"
|
||||||
#include "netdev_bandwidth_conf.h"
|
#include "netdev_bandwidth_conf.h"
|
||||||
|
#include "virresctrl.h"
|
||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_QEMU
|
#define VIR_FROM_THIS VIR_FROM_QEMU
|
||||||
|
|
||||||
@ -7332,6 +7333,12 @@ qemuProcessReconnect(void *opaque)
|
|||||||
if (qemuConnectAgent(driver, obj) < 0)
|
if (qemuConnectAgent(driver, obj) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
for (i = 0; i < obj->def->ncachetunes; i++) {
|
||||||
|
if (virResctrlAllocDeterminePath(obj->def->cachetunes[i]->alloc,
|
||||||
|
priv->machineName) < 0)
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
/* update domain state XML with possibly updated state in virDomainObj */
|
/* update domain state XML with possibly updated state in virDomainObj */
|
||||||
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, obj, driver->caps) < 0)
|
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, obj, driver->caps) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
Reference in New Issue
Block a user