|
|
c1c534 |
From 120967192737301cd93c597ca06824e2f951b658 Mon Sep 17 00:00:00 2001
|
|
|
c1c534 |
Message-Id: <120967192737301cd93c597ca06824e2f951b658@dist-git>
|
|
|
c1c534 |
From: Martin Kletzander <mkletzan@redhat.com>
|
|
|
c1c534 |
Date: Wed, 31 Jan 2018 16:32:45 +0100
|
|
|
c1c534 |
Subject: [PATCH] qemu: Restore resctrl alloc data after restart
|
|
|
c1c534 |
|
|
|
c1c534 |
During reconnect we need to reconstruct the paths of all cachetunes so that they
|
|
|
c1c534 |
get cleaned up when the domain is stopped.
|
|
|
c1c534 |
|
|
|
c1c534 |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
c1c534 |
(cherry picked from commit 6c44013b174d676c37e86fc884bd933cf8f982fa)
|
|
|
c1c534 |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
c1c534 |
|
|
|
c1c534 |
https://bugzilla.redhat.com/show_bug.cgi?id=1289368
|
|
|
c1c534 |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
c1c534 |
---
|
|
|
c1c534 |
src/qemu/qemu_process.c | 7 +++++++
|
|
|
c1c534 |
1 file changed, 7 insertions(+)
|
|
|
c1c534 |
|
|
|
c1c534 |
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
|
c1c534 |
index 08081aa278..3bb4b14948 100644
|
|
|
c1c534 |
--- a/src/qemu/qemu_process.c
|
|
|
c1c534 |
+++ b/src/qemu/qemu_process.c
|
|
|
c1c534 |
@@ -77,6 +77,7 @@
|
|
|
c1c534 |
#include "configmake.h"
|
|
|
c1c534 |
#include "nwfilter_conf.h"
|
|
|
c1c534 |
#include "netdev_bandwidth_conf.h"
|
|
|
c1c534 |
+#include "virresctrl.h"
|
|
|
c1c534 |
|
|
|
c1c534 |
#define VIR_FROM_THIS VIR_FROM_QEMU
|
|
|
c1c534 |
|
|
|
c1c534 |
@@ -7328,6 +7329,12 @@ qemuProcessReconnect(void *opaque)
|
|
|
c1c534 |
if (qemuConnectAgent(driver, obj) < 0)
|
|
|
c1c534 |
goto error;
|
|
|
c1c534 |
|
|
|
c1c534 |
+ for (i = 0; i < obj->def->ncachetunes; i++) {
|
|
|
c1c534 |
+ if (virResctrlAllocDeterminePath(obj->def->cachetunes[i]->alloc,
|
|
|
c1c534 |
+ priv->machineName) < 0)
|
|
|
c1c534 |
+ goto error;
|
|
|
c1c534 |
+ }
|
|
|
c1c534 |
+
|
|
|
c1c534 |
/* update domain state XML with possibly updated state in virDomainObj */
|
|
|
c1c534 |
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, obj, driver->caps) < 0)
|
|
|
c1c534 |
goto error;
|
|
|
c1c534 |
--
|
|
|
c1c534 |
2.16.1
|
|
|
c1c534 |
|