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

Cyrill Gorcunov gorcunov at openvz.org
Wed Apr 11 12:11:48 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.

FIXME
 - file owners field is not yet present on image structure,
   so need to be fixed once main fown engine get merged
 - inotify flags stored in every mark found, this should be
   reworked in pipes manner

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-inotify-Add-checkpoint-restore.patch
Type: text/x-patch
Size: 14547 bytes
Desc: not available
Url : http://openvz.org/pipermail/criu/attachments/20120411/2282371e/0003-inotify-Add-checkpoint-restore-0001.bin


More information about the CRIU mailing list