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