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

Cyrill Gorcunov gorcunov at openvz.org
Wed Jul 4 03:37:35 EDT 2012


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 +++++++++++++++++++
 protobuf/Makefile              |   53 +++++++
 protobuf/image.page.proto      |   11 ++
 protobuf/image.proto           |  316 ++++++++++++++++++++++++++++++++++++++++
 protobuf/image.x86-64.proto    |   51 +++++++
 6 files changed, 593 insertions(+), 4 deletions(-)
 create mode 100644 include/page-protobuf-engine.h
 create mode 100644 protobuf/Makefile
 create mode 100644 protobuf/image.page.proto
 create mode 100644 protobuf/image.proto
 create mode 100644 protobuf/image.x86-64.proto

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-protobuf-Introduce-base-message-prototypes.patch
Type: text/x-patch
Size: 16438 bytes
Desc: not available
Url : http://openvz.org/pipermail/criu/attachments/20120704/a71c9738/0002-protobuf-Introduce-base-message-prototypes-0001.bin


More information about the CRIU mailing list