2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

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>
This commit is contained in:
Pavel Emelyanov
2013-12-25 16:54:53 +04:00
parent d21ff39aab
commit c18b30d0a9
5 changed files with 124 additions and 14 deletions

View File

@@ -113,6 +113,7 @@ struct mount_info {
char *options;
bool mounted;
bool need_plugin;
int is_file;
struct mount_info *next;
/* tree linkage */