[CRIU] [PATCH] Skip root cgroup directories when restoring with manage-cgroup=full

Tycho Andersen tycho.andersen at canonical.com
Mon Aug 31 07:14:55 PDT 2015


On Sun, Aug 30, 2015 at 03:36:03AM +0000, Hui Kang wrote:
> Signed-off-by: Hui Kang <hkang.sunysb at gmail.com>
> Signed-off-by: Andrew Vagin <avagin at openvz.org>
> ---
>  cgroup.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/cgroup.c b/cgroup.c
> index a4e0146..c0392a1 100644
> --- a/cgroup.c
> +++ b/cgroup.c
> @@ -992,6 +992,9 @@ static int prepare_cgroup_dir_properties(char *path, int off, CgroupDirEntry **e
>  		CgroupDirEntry *e = ents[i];
>  		size_t off2 = off;
>  
> +		if (strcmp(e->dir_name, "") == 0 &&
> +		    goto skip; /* skip root cgroups */
> +

Shouldn't we only skip cpu and cpu and memory?

Tycho


More information about the CRIU mailing list