[Devel] [PATCH criu] files: Allow to dump ploopX files opened

Cyrill Gorcunov gorcunov at virtuozzo.com
Thu Aug 4 06:43:21 PDT 2016


On Thu, Aug 04, 2016 at 04:34:57PM +0300, Pavel Emelyanov wrote:
> >  
> > +static int check_blkdev(struct fd_parms *p, int lfd)
> > +{
> > +	/*
> > +	 * @ploop_major is module parameter actually,
> > +	 * set to PLOOP_DEVICE_MAJOR by default. We may
> > +	 * need to scan module params or access
> > +	 * /sys/block/ploopX/dev to fetch major.
> > +	 *
> > +	 * For a while simply use predefined @major.
> > +	 */
> > +	static const int ploop_major = 182;
> 
> Major numbers are typically macro-defined and sit in some header ;)

I don't want to spread Vz7 specific code into headers and such.

> > +	int maj = major(p->stat.st_rdev);
> > +
> > +	/*
> > +	 * It's been found that systemd-udevd sometimes
> > +	 * opens-up ploop device from inside of container,
> > +	 * so allow him to do that.
> > +	 */
> > +	if (maj == ploop_major)
> > +		return 0;
> 
> This worries me :( Ploop has some internal state, so if we catch a proggie
> that configures that state, live migrate it and just re-open the ploop it
> will __continue__ configuring that state and, since we've re-opened the
> ploop from the beginning, this configuration will continue with an error...

Then we need to liftup this code and someone from ploop camp should help me
to gather ploop props which we could dump into image and restore then.


More information about the Devel mailing list