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

Pavel Emelyanov xemul at parallels.com
Fri Mar 16 09:14:06 EDT 2012


On 03/16/2012 05:12 PM, Kinsbursky Stanislav wrote:
> 16.03.2012 15:43, Pavel Emelyanov пишет:
>> On 03/16/2012 02:25 PM, Kinsbursky Stanislav wrote:
>>> From: Stanislav Kinsbursky<skinsbursky at openvz.org>
>>>
>>> Zero pid will be used later in the series to open global images.
>>>
>>> Signed-off-by: Stanislav Kinsbursky<skinsbursky at openvz.org>
>>> ---
>>>   include/crtools.h |   38 +++++++++++++++++++-------------------
>>>   util.c            |    5 ++++-
>>>   2 files changed, 23 insertions(+), 20 deletions(-)
>> 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.



More information about the CRIU mailing list