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

Cyrill Gorcunov gorcunov at openvz.org
Wed Nov 28 12:34:08 EST 2012


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.

	Cyrill


More information about the CRIU mailing list