[CRIU] Re: [PATCH 1/4] dump: add pid number to image name only if it's not equal to zero

Kinsbursky Stanislav skinsbursky at openvz.org
Fri Mar 16 09:55:25 EDT 2012


16.03.2012 17:47, Pavel Emelyanov пишет:
>>>>> The fact that you check pid != 0 in get_image_path implies that you
>>>>> might have some given CR_FD_-type global or local depending on the
>>>>> conditions, but this is not so.
>>>>>
>>>>> Some types are per-task _always_, some are global _always_. That said
>>>>> more logical patch is -- trim %d-s from global ones only and insert
>>>>> a debugging check that when pid != 0 the fmt should contain %-s and
>>>>> when pid == 0 -- should not.
>>>> This will require more code, which will duplicates the existent.
>>>> Why do we need separated open function for global image files?
>>> I didn't say we do.
>> Then clarify your idea, please.
>> Or you want me to guess?
>>
> I want you to think. Take 10 minutes break for this. If fail -- come to
> me to discuss.
>
> Yet again -- some images are per-task and the others are global _always_.

Here are they - again - aesthetic differences.
Yes, images are exactly like you said:  some images are per-task and the others 
are global _always_. And we work with them properly.
You don't like the internal implementation.
And you suggest to have different types of hard-coded names. This means that we 
have to handle them in different way and thus have some indication, this type of 
image file we are opening right now.
What for do we need all this shit?


-- 
Best regards,
Stanislav Kinsbursky




More information about the CRIU mailing list