[CRIU] [PATCH] Dismantle cgyard in non-detached restore mode.

Pavel Emelyanov xemul at parallels.com
Wed Mar 18 12:39:48 PDT 2015


On 03/16/2015 10:03 PM, Saied Kazemi wrote:
> If the --restore-detached command line option is not specified during
> restore, CRIU should unmount and remove the temporary cgyard directory
> tree before waiting for the restored process to exit.  Otherwise, all
> the temporary cgyard mount points will remain mounted and visible.
> 
> Signed-off-by: Saied Kazemi <saied at google.com>

Sorry for the long silence :) I like the patch and will apply one shortly.

But I have a related question -- there's a call to prepare_cgroup_properties
_after_ the restore_root_task(). Does this mean that for non-detaching
restore the properties of the cgroup tree remain un-restored?

Thanks,
Pavel

> ---
>  cr-restore.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/cr-restore.c b/cr-restore.c
> index 4a1fe4e..24d9f8b 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -1845,8 +1845,10 @@ static int restore_root_task(struct pstree_item *init)
>  
>  	write_stats(RESTORE_STATS);
>  
> -	if (!opts.restore_detach && !opts.exec_cmd)
> +	if (!opts.restore_detach && !opts.exec_cmd) {
> +		fini_cgroup();
>  		wait(NULL);
> +	}
>  
>  	return 0;
>  
> 



More information about the CRIU mailing list