[CRIU] [PATCH] inotify: Skip opening deleted file

Cyrill Gorcunov gorcunov at openvz.org
Wed Nov 28 12:38:23 EST 2012


On Wed, Nov 28, 2012 at 09:34:08PM +0400, Cyrill Gorcunov wrote:
> On Wed, Nov 28, 2012 at 09:28:59PM +0400, Pavel Emelyanov wrote:
> > On 11/28/2012 09:26 PM, Cyrill Gorcunov wrote:
> > > In case if we're monitoring deleted file we can't open
> > > it on restore procedure, thus simply skip its recreation.
> > 
> > NAK. This should be done the other way.
> > 
> > On dump we should find out, that the file is unlinked and note this
> > fact in the image. On restore we should restore a temp file, inotify
> > it and unlink back.
> 
> No. Create/unlink generates "delete" event which we should escape
> receiving. To figure out that file is unlinked (note we have only
> a file handle here) we could try to open it and if we get EBADF
> then we can assume it was removed.

But same time this attempt to open() may generate an "open" event which we
should try to escape on dumping stage as well.

I mean at moment we dont dump "queued" events and in case if the task
is not continue working after the dump, we can safely try to open
targets at checkpoint stage, but this is inacceptable in case if task
is continue running after checkpoint I guess.

	Cyrill


More information about the CRIU mailing list