[systemd-devel] [PATCH v2 3/5] core/mount-setup: Mount unified hierchy, instead of name=systemd, when compiled to do so.

Dimitri John Ledkov dimitri.j.ledkov at intel.com
Fri May 29 13:46:43 PDT 2015


---
 src/core/mount-setup.c | 5 +++++
 src/shared/def.h       | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index c35248e..3112e00 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -94,10 +94,15 @@ static const MountPoint mount_table[] = {
           NULL,          MNT_FATAL|MNT_IN_CONTAINER },
         { "tmpfs",       "/sys/fs/cgroup",            "tmpfs",      "mode=755",                MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME,
           NULL,          MNT_FATAL|MNT_IN_CONTAINER },
+#ifdef HAVE_UNIFIED_CGROUP
+        { "cgroup",      "/sys/fs/cgroup/systemd",    "cgroup",     "__DEVEL__sane_behavior",  MS_NOSUID|MS_NOEXEC|MS_NODEV,
+          NULL,          MNT_FATAL|MNT_IN_CONTAINER },
+#else
         { "cgroup",      "/sys/fs/cgroup/systemd",    "cgroup",     "none,name=systemd,xattr", MS_NOSUID|MS_NOEXEC|MS_NODEV,
           NULL,          MNT_IN_CONTAINER           },
         { "cgroup",      "/sys/fs/cgroup/systemd",    "cgroup",     "none,name=systemd",       MS_NOSUID|MS_NOEXEC|MS_NODEV,
           NULL,          MNT_FATAL|MNT_IN_CONTAINER },
+#endif
         { "pstore",      "/sys/fs/pstore",            "pstore",     NULL,                      MS_NOSUID|MS_NOEXEC|MS_NODEV,
           NULL,          MNT_NONE                   },
 #ifdef ENABLE_EFI
diff --git a/src/shared/def.h b/src/shared/def.h
index a3d9fcf..5790f4b 100644
--- a/src/shared/def.h
+++ b/src/shared/def.h
@@ -35,7 +35,11 @@
  * the watchdog pings will keep the loop busy. */
 #define DEFAULT_EXIT_USEC (30*USEC_PER_SEC)
 
+#ifdef HAVE_UNIFIED_CGROUP
+#define SYSTEMD_CGROUP_CONTROLLER ""
+#else
 #define SYSTEMD_CGROUP_CONTROLLER "name=systemd"
+#endif
 
 #define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
 #define SIGNALS_IGNORE SIGPIPE
-- 
2.1.4



More information about the systemd-devel mailing list