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

Cyrill Gorcunov gorcunov at openvz.org
Fri May 25 02:51:37 EDT 2012


On Fri, May 25, 2012 at 10:40:45AM +0400, Pavel Emelyanov wrote:
> On 05/23/2012 07:35 PM, Cyrill Gorcunov wrote:
> > 
> > Use fdtype_ops facility to c/r unix sockets.
> > 
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> >  include/image.h   |    1 +
> >  include/sockets.h |    3 +-
> >  sk-unix.c         |  100 +++++++++++++++++++++++++++++------------------------
> >  sockets.c         |    2 +-
> >  4 files changed, 58 insertions(+), 48 deletions(-)
> > 
> 
> > -	if (write_img(fdset_fd(cr_fdset, CR_FD_FDINFO), &fe))
> > +	if (!can_dump_unix_sk(sk))
> >  		goto err;
> >  
> >  	if (sk->sd.already_dumped)
> >  		return 0;
> 
> This should be BUG_ON()

Yes, thanks

> > -	ue.id		= sk->sd.ino;
> > +	ue.id		= id;
> 
> And about the restore -- this one works due to fds being sorted based on
> their IDs to resolve "who restores and who accepts" question. Double check,
> that this sorting doesn't get broken when you switch from one ID to two
> (file id and socket ino).

OK, will check

	Cyrill


More information about the CRIU mailing list