[CRIU] [PATCH 1/2] cgroups: Add ability to reuse existing cgroup yard directory
Pavel Emelyanov
xemul at parallels.com
Tue Jun 2 08:29:00 PDT 2015
> @@ -1128,27 +1124,8 @@ static int prepare_cgroup_sfd(CgroupEntry *ce)
>
> pr_info("Preparing cgroups yard\n");
>
> - off = sprintf(paux, ".criu.cgyard.XXXXXX");
> - if (mkdtemp(paux) == NULL) {
> - pr_perror("Can't make temp cgyard dir");
> - return -1;
> - }
> -
> - cg_yard = xstrdup(paux);
> - if (!cg_yard) {
> - rmdir(paux);
> - return -1;
> - }
> -
> - if (mount("none", cg_yard, "tmpfs", 0, NULL)) {
> - pr_perror("Can't mount tmpfs in cgyard");
> - goto err;
> - }
> -
> - if (mount("none", cg_yard, NULL, MS_PRIVATE, NULL)) {
> - pr_perror("Can't make cgyard private");
> - goto err;
> - }
> + cg_yard = opts.cg_yard;
> + off = strlen(opts.cg_yard);
>
> pr_debug("Opening %s as cg yard\n", cg_yard);
> i = open(cg_yard, O_DIRECTORY);
Below there goes the code that mounts individual controllers into
the cgyard path. Do we still need one?
-- Pavel
More information about the CRIU
mailing list