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

crtools: Introduce the --ext-mount-map option (v3)

On dump one uses one or more --ext-mount-map option with A:B arguments.
A denotes a mountpoint (as seen from the target mount namespace) criu
dumps and B is the string that will be written into the image file
instead of the mountpoint's root.

On restore one uses the same --ext-mount-map option(s) with similar
A:B arguments, but this time criu treats A as string from the image's
root field (foobar in the example above) and B as the path in criu's
mount namespace the should be bind mounted into the mountpoint.

v3:
* Added documentation
* Added RPC bits
* Changed option name into --ext-mount-map
* Use colon as key and value separator

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2014-06-09 17:26:17 +04:00
parent c3ea0ba06f
commit c7e0042946
8 changed files with 82 additions and 1 deletions

View File

@@ -99,6 +99,7 @@ struct fstype {
int (*parse)(struct mount_info *pm);
};
struct ext_mount;
struct mount_info {
int mnt_id;
int parent_mnt_id;
@@ -123,6 +124,8 @@ struct mount_info {
struct mount_info *next;
struct ns_id *nsid;
struct ext_mount *external;
/* tree linkage */
struct mount_info *parent;
struct mount_info *bind;