criu/include/plugin.h
Pavel Emelyanov c18b30d0a9 mount: Restore external bind-mounts with plugins
All the entries with with_plugin set will be mounted by plugin.
The interesting case is when we do the pivot-root restore. In this
case we call restore callback very early (before we unmount the old
tree) and ask it to create the mountpoint at temporary location.
Later we move the mount to proper place.

The old_root argument of the callback is where it can find files
in the original mount namespace.

The is_file is return-argument. Sine files and directories cannot be
bind-mounted to each-other, the callback should create the mountpoint
itself and report whether it created file or directory.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-12-26 11:07:41 +04:00

20 lines
488 B
C

#ifndef __CR_PLUGIN_H__
#define __CR_PLUGIN_H__
#include "criu-plugin.h"
#define CR_PLUGIN_DEFAULT "/var/lib/criu/"
void cr_plugin_fini(void);
int cr_plugin_init(void);
int cr_plugin_dump_unix_sk(int fd, int id);
int cr_plugin_restore_unix_sk(int id);
int cr_plugin_dump_file(int fd, int id);
int cr_plugin_restore_file(int id);
int cr_plugin_dump_ext_mount(char *mountpoint, int id);
int cr_plugin_restore_ext_mount(int id, char *mountpoint, char *old_root, int *is_file);
#endif