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

Pavel Emelyanov xemul at parallels.com
Wed Nov 28 12:38:42 EST 2012


On 11/28/2012 09:34 PM, 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.

If the file being watched is unlinked it _should_ have generated this
event already, no?

> 	Cyrill
> .
> 




More information about the CRIU mailing list