[CRIU] [PATCH 4/4] inotify: Add checkpoint/restore

Cyrill Gorcunov gorcunov at openvz.org
Tue Apr 10 08:43:03 EDT 2012


To checkpoint notifiers we need help from
kernel side, thus FS_INOTIFY_GET_MARK ioctl
code added.

Other than that

 - the inotifies get collected into global inotify.img file

 - at restore time they are read and restored with help
   of inotify_init and inotify_add_watch calls

 - since one inotify file descriptor can have a number
   of watchdogs attached, at restore time everything is
   collected not just to file descriptor list but to
   inotify_head list as well, so we can figure out
   which exactly watchdogs are to be attached when
   particular inotify file descriptor is created.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 Makefile          |    1 +
 cr-dump.c         |   12 ++-
 cr-restore.c      |    4 +
 cr-show.c         |   24 +++++
 crtools.c         |    7 ++
 include/crtools.h |    3 +
 include/image.h   |   12 +++
 include/inotify.h |   33 +++++++
 include/types.h   |    7 ++
 inotify.c         |  272 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 10 files changed, 373 insertions(+), 2 deletions(-)
 create mode 100644 include/inotify.h
 create mode 100644 inotify.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-inotify-Add-checkpoint-restore.patch
Type: text/x-patch
Size: 12611 bytes
Desc: not available
Url : http://openvz.org/pipermail/criu/attachments/20120410/e8ce9c47/0004-inotify-Add-checkpoint-restore.bin


More information about the CRIU mailing list