[CRIU] Re: [PATCH 3/4] inotify: Add checkpoint/restore

Pavel Emelyanov xemul at parallels.com
Wed Apr 11 14:52:42 EDT 2012


On 04/11/2012 10:49 PM, Cyrill Gorcunov wrote:
> On Wed, Apr 11, 2012 at 10:43:27PM +0400, Pavel Emelyanov wrote:
>>> +	/*
>>> +	 * We could bind watchdog to self-fd directly but thi
>>> +	 * changes the number of file descriptors and self-test
>>> +	 * for amount of file descriptors dumped and restored
>>> +	 * fails otherwise.
>>> +	 */
>>
>> I don't understand this. If we do
>>
>> fd = open_by_handle_at();
>>
>> and then
>>
>> sprintf(path, "/proc/sef/fd/%d", fd);
>> inotify_add_watch(ifd, path);
>>
>> what goes wrong? Doesn't the inotify pick up the desired
>> inode into its watchlist? What does it do then? Fail? Or
>> starts watching the /proc inode?
> 
> It's will find correct inode. Crap, sure you're right,
> I messed it with file descriptor created for inotify
> descriptor itself.
> 
> Pavel, can we live with this as is? I'll be fixing this
> series anyway so I would post changes on top.

There are other comments from me, so please, fix it as well
in v7 series.

> Using "link" here is simply suboptimal but not error
> by any means and it's hidden inside serive function
> so the rest of crtools code will not even notice the
> change I bring in later.
> 
> 	Cyrill
> .
> 



More information about the CRIU mailing list