[CRIU] Re: [PATCH 4/6] fowners: Add file owners dumping

Cyrill Gorcunov gorcunov at openvz.org
Mon Apr 9 02:41:48 EDT 2012


On Mon, Apr 09, 2012 at 10:36:13AM +0400, Pavel Emelyanov wrote:
> On 04/08/2012 01:14 AM, Cyrill Gorcunov wrote:
> > 
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> >  cr-dump.c       |   43 +++++++++++++++++++++++++++++++++++++++++++
> >  include/files.h |    1 +
> >  2 files changed, 44 insertions(+), 0 deletions(-)
> > 
> 
> > @@ -334,6 +338,9 @@ err:
> >  static int dump_one_fdinfo(struct fd_parms *p, int lfd,
> >  			     const struct cr_fdset *cr_fdset)
> >  {
> > +	if (fill_fd_params_fown(lfd, p))
> > +		return -1;
> > +
> >  	p->id = MAKE_FD_GENID(p->stat.st_dev, p->stat.st_ino, p->pos);
> >  	if (S_ISFIFO(p->stat.st_mode))
> >  		p->type = FDINFO_PIPE;
> 
> This should occur in read_fd_parms, not here.
> 

Why? No need to do this call on anything but the files and pipes.
I can move this snippet of course, but this will be just spending
cycles for nothing.

	Cyrill


More information about the CRIU mailing list