[CRIU] Re: [PATCH] restore: Order file restoring by their type

Pavel Emelyanov xemul at parallels.com
Sat Apr 28 10:08:01 EDT 2012


On 04/28/2012 05:59 PM, Cyrill Gorcunov wrote:
> On Sat, Apr 28, 2012 at 05:52:35PM +0400, Pavel Emelyanov wrote:
>> On 04/28/2012 05:36 PM, Cyrill Gorcunov wrote:
>>> We need the files being restored in order of their
>>> type. In particular when we restore eventpoll file
>>> we expect every file descriptor the epoll watches on
>>> is already created and opened.
>>
>> I'd explicitly restore only eventpoll files at the very
>> end instead.
> 
> Why? I think restoration driven by enum order is better.

Why?

> If I do what you propose -- I'll have to add tests for
> file not being eventpoll to restore them afetr all other
> files. 

Exactly! And this will be self-documenting why this order matters
at all. But just splitting the restore per-type makes code readers
wonder why and (!) be surprised why the new fdinfo type added by them
_after_ the eventpoll doesn't work well...

> Moreover I need the same for inotify. Which will
> make code uglier.

No, for inotify you don't need this. You bind inotifies to inodes,
not to fd-s.

> 	Cyrill
> 



More information about the CRIU mailing list