render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
Blob Blame History Raw
From 5429c3dfd57da26b6d6fd6368bc88d695ea2e852 Mon Sep 17 00:00:00 2001
Message-Id: <5429c3dfd57da26b6d6fd6368bc88d695ea2e852@dist-git>
From: Pavel Hrdina <phrdina@redhat.com>
Date: Mon, 1 Jul 2019 17:07:15 +0200
Subject: [PATCH] vircgroup: introduce virCgroupV2CopyMounts
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit 38a3fb56471d77102f58f19a1e68d3fb372e5cb0)

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689297

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Message-Id: <67863a638cc2666f1f2f8e7151125c32952aa247.1561993100.git.phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
---
 src/util/vircgroupv2.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c
index 02dc4e4686..5d3c80b309 100644
--- a/src/util/vircgroupv2.c
+++ b/src/util/vircgroupv2.c
@@ -132,11 +132,20 @@ virCgroupV2ValidateMachineGroup(virCgroupPtr group,
 }
 
 
+static int
+virCgroupV2CopyMounts(virCgroupPtr group,
+                      virCgroupPtr parent)
+{
+    return VIR_STRDUP(group->unified.mountPoint, parent->unified.mountPoint);
+}
+
+
 virCgroupBackend virCgroupV2Backend = {
     .type = VIR_CGROUP_BACKEND_TYPE_V2,
 
     .available = virCgroupV2Available,
     .validateMachineGroup = virCgroupV2ValidateMachineGroup,
+    .copyMounts = virCgroupV2CopyMounts,
 };
 
 
-- 
2.22.0