|
|
c480ed |
From f335c220a4ac822b6b66c8bd4dca0c85aad187f7 Mon Sep 17 00:00:00 2001
|
|
|
c480ed |
Message-Id: <f335c220a4ac822b6b66c8bd4dca0c85aad187f7@dist-git>
|
|
|
c480ed |
From: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c480ed |
Date: Mon, 1 Jul 2019 17:07:20 +0200
|
|
|
c480ed |
Subject: [PATCH] vircgroup: introduce virCgroupV2StealPlacement
|
|
|
c480ed |
MIME-Version: 1.0
|
|
|
c480ed |
Content-Type: text/plain; charset=UTF-8
|
|
|
c480ed |
Content-Transfer-Encoding: 8bit
|
|
|
c480ed |
|
|
|
c480ed |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c480ed |
(cherry picked from commit f7394dcf010fc4be50b822e290e701430d45325d)
|
|
|
c480ed |
|
|
|
c480ed |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689297
|
|
|
c480ed |
|
|
|
c480ed |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c480ed |
Message-Id: <5e3bd896f2aa16a3637b90d1c8bd3b0676c2acbd.1561993100.git.phrdina@redhat.com>
|
|
|
c480ed |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
c480ed |
---
|
|
|
c480ed |
src/util/vircgroupv2.c | 12 ++++++++++++
|
|
|
c480ed |
1 file changed, 12 insertions(+)
|
|
|
c480ed |
|
|
|
c480ed |
diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c
|
|
|
c480ed |
index 815d8fca9b..270a6fb305 100644
|
|
|
c480ed |
--- a/src/util/vircgroupv2.c
|
|
|
c480ed |
+++ b/src/util/vircgroupv2.c
|
|
|
c480ed |
@@ -220,6 +220,17 @@ virCgroupV2ValidatePlacement(virCgroupPtr group,
|
|
|
c480ed |
}
|
|
|
c480ed |
|
|
|
c480ed |
|
|
|
c480ed |
+static char *
|
|
|
c480ed |
+virCgroupV2StealPlacement(virCgroupPtr group)
|
|
|
c480ed |
+{
|
|
|
c480ed |
+ char *ret;
|
|
|
c480ed |
+
|
|
|
c480ed |
+ VIR_STEAL_PTR(ret, group->unified.placement);
|
|
|
c480ed |
+
|
|
|
c480ed |
+ return ret;
|
|
|
c480ed |
+}
|
|
|
c480ed |
+
|
|
|
c480ed |
+
|
|
|
c480ed |
virCgroupBackend virCgroupV2Backend = {
|
|
|
c480ed |
.type = VIR_CGROUP_BACKEND_TYPE_V2,
|
|
|
c480ed |
|
|
|
c480ed |
@@ -230,6 +241,7 @@ virCgroupBackend virCgroupV2Backend = {
|
|
|
c480ed |
.detectMounts = virCgroupV2DetectMounts,
|
|
|
c480ed |
.detectPlacement = virCgroupV2DetectPlacement,
|
|
|
c480ed |
.validatePlacement = virCgroupV2ValidatePlacement,
|
|
|
c480ed |
+ .stealPlacement = virCgroupV2StealPlacement,
|
|
|
c480ed |
};
|
|
|
c480ed |
|
|
|
c480ed |
|
|
|
c480ed |
--
|
|
|
c480ed |
2.22.0
|
|
|
c480ed |
|