[CRIU] [PATCH v3 08/16] rst_info: artificial files list introduced

Stanislav Kinsburskiy skinsbursky at odin.com
Mon Dec 14 03:55:14 PST 2015



14.12.2015 12:47, Pavel Emelyanov пишет:
> On 12/14/2015 02:16 PM, Stanislav Kinsburskiy wrote:
>>
>> 14.12.2015 12:10, Pavel Emelyanov пишет:
>>> On 12/10/2015 06:16 PM, Stanislav Kinsburskiy wrote:
>>>> This list is used to collect and handle some service files, which an be used
>>>> only during restore procedure for some service perations, and must be closed
>>>> before process is released.
>>> OK, but I see only opening code in here, where's the closing one?
>> I do close in post_open() callback.
>> If there is a better place, I would be glad to do it there.
> In the post_open_fd() right after calling the ->post_open?
>

Emm. How to distinguish, which fd have to closed and which has not?
By introducing another optional callback?

>>>> AutoFS will use them to fix up mount points druing restore.
>>> Why can't we use existing fds list?
>> We can, if we put them at the end on the list.
> Why at the end of the list?

Because artificial files is just a way to operate on existent ones. Thus 
existent ones have to be processes (opened) befoe artificial ones.

>> But these files are special.
>> So, from my pow, it's better to have them in separated list. Especially
>> the are going to be explicitly closed somewhere later.
>



More information about the CRIU mailing list