[CRIU] Re: [PATCH 2/3] protobuf: Introduce base message prototypes

Pavel Emelyanov xemul at parallels.com
Wed Jul 4 04:28:22 EDT 2012


On 07/04/2012 11:37 AM, Cyrill Gorcunov wrote:
> 
> This patch introduces base message prototypes Google's protobuf facility.
> 
> A short story -- there were a long conversation on which format should
> be used to keep checkpointed data on disk image. We ended up in using
> Google's Protocol Buffers (see https://developers.google.com/protocol-buffers/
> for detailed description). Thus every image snippet should be convered
> to use this facility.
> 
> But before anything else we need a scaffold, ie .proto files which declare
> entries on disk. This patch does exactly that.
> 
> Still we need some tricks to be used for our parasite c/r code -- this code
> can't use libc neither any else library so we provide two helpers
> 
>  - protobuf_page_write
>  - protobuf_page_read
> 
> they do write/read page entries on/from disk in protobuf format and can be used
> in pie code.
> 
> Note that there is no real use of this facility in our code yet.
> 
> Build note: one should have protobuf and protobuf-c installed to be able
> to build crtools.
> 
>  - http://code.google.com/p/protobuf/
>  - http://code.google.com/p/protobuf-c/
> 
> Inspired-by: Kinsbursky Stanislav <skinsbursky at openvz.org>
> Inspired-by: Pavel Emelianov <xemul at parallels.com>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  Makefile                       |   14 ++-
>  include/page-protobuf-engine.h |  152 +++++++++++++++++++

First of all -- I do not like the idea of pulling event bits of the protobuffer engine
into the crtools. If there's no other way of dumping pages then let's just dump them in
a raw format.

Thanks,
Pavel


More information about the CRIU mailing list