[CRIU] [PATCH 09/10] ns: Add c/r for /proc/$pid/ns/$ids references

Cyrill Gorcunov gorcunov at openvz.org
Mon May 20 05:30:22 EDT 2013


In this commit we implement c/r for files which have opened
/proc/$pid/ns/$ids entries.

The idea is rather simple one

Checkpoint
==========

- Check if the file name is the one of known to be ns ref
- If match then write protobuf entry

Restore
=======

- Read all ns entries from the image
- When criu tries to open one we lookup over process
  tree to figure out which PID should be used in path
  and then just open it

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 cr-restore.c         |   3 ++
 files.c              |  12 ++---
 include/files.h      |   2 +
 include/namespaces.h |   4 ++
 namespaces.c         | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 145 insertions(+), 7 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-ns-Add-c-r-for-proc-pid-ns-ids-references.patch
Type: text/x-patch
Size: 5614 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20130520/909985aa/attachment.bin>


More information about the CRIU mailing list