[libvirt PATCH 22/23] lxc: replace use of term 'slave' filesystem mount setup

Daniel P. Berrangé berrange at redhat.com
Fri Jun 19 09:32:59 UTC 2020


Refer to the notion of mount propagation instead which describes
the actual behaviour more clearly.

Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 src/lxc/lxc_controller.c | 6 +++---
 src/util/virprocess.c    | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 59b44dde1f..89f9773b2c 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -2116,9 +2116,9 @@ virLXCControllerSetupPrivateNS(void)
      *
      * Thus we call unshare(CLONE_NS) so that we can see
      * the guest's new /dev/pts, without it becoming
-     * visible to the host OS. We also put the root FS
-     * into slave mode, just in case it was currently
-     * marked as shared
+     * visible to the host OS. We also disable mount
+     * propagation out of the root FS, in case it was
+     * currently allowing bi-directional propagation.
      */
 
     return virProcessSetupPrivateMountNS();
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index afb1f9b79f..a9afa2e665 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -1288,7 +1288,7 @@ virProcessSetupPrivateMountNS(void)
 
     if (mount("", "/", "none", MS_SLAVE|MS_REC, NULL) < 0) {
         virReportSystemError(errno, "%s",
-                             _("Failed to switch root mount into slave mode"));
+                             _("Failed disable mount propagation out of the root filesystem"));
         return -1;
     }
 
-- 
2.24.1




More information about the libvir-list mailing list