new->fs_type = fs_type;
new->controllers = controllers;
- new->mountpoint = mnt;
+ new->at_mnt = mnt;
new->at_base = base_cgroup;
new->dfd_mnt = dfd_mnt;
__do_free char *hierarchy_mnt = NULL, *path2 = NULL;
struct hierarchy *h = ops->hierarchies[i];
- ret = mkdirat(dfd_mnt_tmpfs, h->mountpoint, 0000);
+ ret = mkdirat(dfd_mnt_tmpfs, h->at_mnt, 0000);
if (ret < 0)
- return syserrno(false, "Failed to create cgroup mountpoint %d(%s)", dfd_mnt_tmpfs, h->mountpoint);
+ return syserrno(false, "Failed to create cgroup at_mnt %d(%s)", dfd_mnt_tmpfs, h->at_mnt);
if (in_cgroup_ns && wants_force_mount) {
/*
* need to mount the cgroups manually.
*/
ret = cgroupfs_mount(cgroup_automount_type, h, rootfs,
- dfd_mnt_tmpfs, h->mountpoint);
+ dfd_mnt_tmpfs, h->at_mnt);
if (ret < 0)
return false;
/* Here is where the ancient kernel section begins. */
ret = cgroupfs_bind_mount(cgroup_automount_type, h, rootfs,
- dfd_mnt_tmpfs, h->mountpoint);
+ dfd_mnt_tmpfs, h->at_mnt);
if (ret < 0)
return false;
if (!cgroup_root)
cgroup_root = must_make_path(rootfs_mnt, DEFAULT_CGROUP_MOUNTPOINT, NULL);
- hierarchy_mnt = must_make_path(cgroup_root, h->mountpoint, NULL);
+ hierarchy_mnt = must_make_path(cgroup_root, h->at_mnt, NULL);
path2 = must_make_path(hierarchy_mnt, h->at_base,
ops->container_cgroup, NULL);
ret = mkdir_p(path2, 0755);
if (!path)
return NULL;
- len = strlen(h->mountpoint);
- if (!strnequal(h->mountpoint, DEFAULT_CGROUP_MOUNTPOINT,
+ len = strlen(h->at_mnt);
+ if (!strnequal(h->at_mnt, DEFAULT_CGROUP_MOUNTPOINT,
STRLITERALLEN(DEFAULT_CGROUP_MOUNTPOINT))) {
path += STRLITERALLEN(DEFAULT_CGROUP_MOUNTPOINT);
path += strspn(path, "/");
* - unified hierarchy
* Either NULL, or a null-terminated list of all enabled controllers.
*
- * @mountpoint
- * - The mountpoint we will use.
+ * @at_mnt
+ * - The at_mnt we will use.
* - legacy hierarchy
* It will be either /sys/fs/cgroup/controller or
* /sys/fs/cgroup/controllerlist.
*/
char **cgroup2_chown;
char **controllers;
- char *mountpoint;
char *container_full_path;
char *container_limit_path;
cgroupfs_type_magic_t fs_type;
/* File descriptor for the monitor's cgroup. */
int cgfd_mon;
- /* File descriptor for the controller's mountpoint @mountpoint. */
+ /* File descriptor for the controller's mountpoint @at_mnt. */
int dfd_mnt;
+ char *at_mnt;
/* File descriptor for the controller's base cgroup path @at_base. */
int dfd_base;
return ops->unified->cgfd_con;
}
-#define make_cgroup_path(__hierarchy, __first, ...) \
- ({ \
- const struct hierarchy *__h = __hierarchy; \
- must_make_path(DEFAULT_CGROUP_MOUNTPOINT, __h->mountpoint, \
- __first, __VA_ARGS__); \
+#define make_cgroup_path(__hierarchy, __first, ...) \
+ ({ \
+ const struct hierarchy *__h = __hierarchy; \
+ must_make_path(DEFAULT_CGROUP_MOUNTPOINT, __h->at_mnt, \
+ __first, __VA_ARGS__); \
})
#endif /* __LXC_CGROUP_H */