[CRIU] [PATCH 3/3] fifo: Add checkpoint restore for fifos

Cyrill Gorcunov gorcunov at openvz.org
Tue Jun 26 10:49:57 EDT 2012


Checpoint and restore of fifo is similar to
pipes c/r except the pipe end-points are named
file.

Because the fifo has a name we use regular files
facility for fifo path c/r.

Still there is a trick used to "open" fifo:
the opening procedure migh sleep if a fifo's peer
is not yet opened, so before doing a real open
we yield a fake open procedure (with O_RDWR flag)
which prevents us from sleeping even if peer
is not yet ready.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 Makefile            |    1 +
 cr-dump.c           |    9 ++-
 cr-restore.c        |    4 +
 cr-show.c           |   40 +++++++---
 crtools.c           |    2 +
 fifo.c              |  212 +++++++++++++++++++++++++++++++++++++++++++++++++++
 files-reg.c         |    8 --
 include/crtools.h   |    4 +
 include/fifo.h      |   10 +++
 include/files-reg.h |   10 +++
 include/image.h     |    8 ++
 11 files changed, 288 insertions(+), 20 deletions(-)
 create mode 100644 fifo.c
 create mode 100644 include/fifo.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-fifo-Add-checkpoint-restore-for-fifos.patch
Type: text/x-patch
Size: 11066 bytes
Desc: not available
Url : http://openvz.org/pipermail/criu/attachments/20120626/45c855f6/0003-fifo-Add-checkpoint-restore-for-fifos-0001.bin


More information about the CRIU mailing list