[CRIU] Re: [PATCH 07/12] dump: Use parasite file descriptors draining

Cyrill Gorcunov gorcunov at openvz.org
Tue Mar 27 10:41:38 EDT 2012


On Tue, Mar 27, 2012 at 06:09:35PM +0400, Pavel Emelyanov wrote:
> >> This is wrong.
> > 
> > Why? You can't get file descriptor number started from '.',
> > this is not arbitrary directory we're scanning but /proc/fd
> > with predefined structure.
> 
> Sorry, I was in a hurry and said it wrongly. The old code did scan of proc/pid/fd
> in one way, you need to do the same, thus do not rewrite it that much. If you don't
> like existing two strcmps fix it with separate patch.
> 

Ah, I see what you mean. Sure I'll update, thanks!

> > +	p->id		= FD_ID_INVALID;
> > 
> > where is the _reformatting_?
> 
> More tabs in between.
> 

OK, if you prefer it this way, I'll update ;)

> >>> +	int nr_fds = PARASITE_MAX_FDS;
> >>> +	int fds[nr_fds];
> >>
> >> I wouldn't allocate that much space on stack.
> > 
> > It's not that much, but if you prefer, I can use malloc here.
> 
> Yes, please.

Sure!

	Cyrill


More information about the CRIU mailing list