[CRIU] [PATCH cr 00/12] Use the common scheme for restoring pipes
Andrey Vagin
avagin at openvz.org
Thu Apr 5 07:47:01 EDT 2012
What is a pipe? It's a set of file structs, which connect to
pipe's tails.
Information about pipes are saved in one files.
pipe_entry describes a pipe's file struct.
A pipe has not own properties, so it has not own object.
All pipe_entry of the same pipes connet in pipe_list. When all
pipe_entry-s and fdinfo-s collected, we enumirate them one
more time to choose who will create pipes.
A pipe is restored by the process with minimal pid for
the descriptor with minimal number. Other recipients
get it via unix sockets even if they are in the same process.
It may be optimized in the future.
All pipe data are aligned in imege file due to splice.
A few zdtm test cases are added.
Andrey Vagin (12):
pipe: write some data in pipe and read it after suspend/resume
pipe: remove old code for restoring pipes
pipe: all pipes are seved in one file
files: split open_transport_fd
pipe: add a separate file for pipe's stuff
files: add some function in files.h
pipes: add functions for collecting pipes
pipe: choose who will restore a pipe
pipes: add functions to restore pipes
pipes: restore pipes data
zdtm: add a new test case to check that all data can be restored
pipes: align pipe data on page size in an image file
Makefile | 1 +
cr-dump.c | 208 ++++++++++---------
cr-restore.c | 448 +---------------------------------------
cr-show.c | 12 +-
files.c | 63 ++++---
include/crtools.h | 4 +-
include/files.h | 19 ++
include/image.h | 5 +-
pipes.c | 375 +++++++++++++++++++++++++++++++++
test/zdtm.sh | 1 +
test/zdtm/live/static/Makefile | 1 +
test/zdtm/live/static/pipe00.c | 10 +
test/zdtm/live/static/pipe01.c | 132 ++++++++++++
13 files changed, 704 insertions(+), 575 deletions(-)
create mode 100644 pipes.c
create mode 100644 test/zdtm/live/static/pipe01.c
More information about the CRIU
mailing list