[CRIU] Re: [PATCH 6/8] inotify: Add checkpoint/restore

Cyrill Gorcunov gorcunov at openvz.org
Mon Apr 16 05:03:26 EDT 2012


On Mon, Apr 16, 2012 at 12:55:59PM +0400, Pavel Emelyanov wrote:
> Almost perfect.
> 
> > +struct inotify_wd_entry {
> > +	u32	id;
> > +	u64	i_ino;
> > +	u32	mask;
> > +	u32	s_dev;
> > +	u32	r_dev;
> 
> Unused.

Yes, it's unused now, together with i_ino. The question
is would we need them in future? i_ino is very useful for
debuggin so I would prefer to save it but not sure about r_dev.
Pavel, if you confirm we really won't need it any time in
future, I'll drop it.

> 
> > +	mntpath = get_mnt_root(iwe->s_dev, mntinfo, nr_mntinfo);
> > +	mntfd = open(mntpath, O_RDONLY);
> > +	if (mntfd < 0) {
> > +		pr_err("Mount root for %x not found\n", iwe->s_dev);
> > +		return -1;
> > +	}
> 
> I'd make get_mnt_root() return an fd.

The problem is that someone should close it at final pass otherwise
our zdtm engine will scream out about difference of opened files
at dump and restore. I'll check it out. Thanks.

OK, to all other nits. Thanks!

	Cyrill


More information about the CRIU mailing list