[CRIU] Re: [PATCH 2/5] This patch introduces base message prototypes Google's protobuf facility.

Stanislav Kinsbursky skinsbursky at parallels.com
Thu Jul 5 03:46:34 EDT 2012


05.07.2012 10:04, Cyrill Gorcunov пишет:
> On Thu, Jul 05, 2012 at 09:48:25AM +0400, Stanislav Kinsbursky wrote:
>>> +
>>> +message img_hdr {
>>> +	required fixed64			magic		= 1;
>>> +	required fixed64			version		= 2;
>>> +	required fixed64			flags		= 3;
>>
>> What are these flags stands for?
>
> Consider it as reserved for now. We don't use it at moment but might
> need in future.
>

Protobuf allows easy add of new fields.
Why do we need to reserve space?

>>> +}
>>> +
>>> +message obj_hdr {
>>> +	enum obj_type {
>>> +		OBJ_UNKNOWN		=	0;
>>> +		OBJ_START		=	1;
>>> +		OBJ_STOP		=	2;
>>> +
>>> +		OBJ_STARTA		=	3;
>>> +		OBJ_ENDA		=	4;
>>> +
>>> +		OBJ_FDINFO		=	5;
>>> +		OBJ_REGFILE		=	6;
>>> +	}
>>> +
>>
>> Do we really need this obj_type?
>
> yes, we do need
>
>>
>>> +	required fixed32			type		= 1;
>>
>> Why file magic is not enough?
>
> Because this allow us to make format more flexible. And
> believe me it will save our asses one day.
>
> 	Cyrill
>


-- 
Best regards,
Stanislav Kinsbursky





More information about the CRIU mailing list