[CRIU] Re: [PATCH 2/4] sockets, inet: Use general machnism for checkpoint/restore

Pavel Emelyanov xemul at parallels.com
Fri May 25 02:41:20 EDT 2012


On 05/23/2012 07:35 PM, Cyrill Gorcunov wrote:
> 
> Use fdtype_ops facility to c/r inet sockets.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  include/image.h   |    1 +
>  include/sockets.h |    3 +--
>  sk-inet.c         |   34 ++++++++++++++++++++--------------
>  sk-tcp.c          |    2 +-
>  sockets.c         |    2 +-
>  5 files changed, 24 insertions(+), 18 deletions(-)
> 
> -	fe.id = sk->sd.ino;
> -	fe.flags = p->fd_flags;
> -
> -	if (write_img(fdset_fd(cr_fdset, CR_FD_FDINFO), &fe))
> +	if (!can_dump_inet_sk(sk))
>  		goto err;
>  
>  	if (sk->sd.already_dumped)

This should be BUG_ON() as well.




More information about the CRIU mailing list