[CRIU] [PATCH 8/9] files: Add c/r for /proc/$pid/ns/$ids references

Cyrill Gorcunov gorcunov at openvz.org
Fri May 17 16:06:48 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              |  18 +++++++-
 include/files.h      |   2 +
 include/namespaces.h |   4 ++
 namespaces.c         | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 150 insertions(+), 1 deletion(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-files-Add-c-r-for-proc-pid-ns-ids-references.patch
Type: text/x-patch
Size: 5625 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20130518/1e033271/attachment.bin>


More information about the CRIU mailing list