[Devel] [PATCH 1/2] spfs: pass both "mountpoint" and "ns_mountpoint" paths to manager
Stanislav Kinsburskiy
skinsbursky at virtuozzo.com
Fri Jun 9 16:44:23 MSK 2017
Now, these two paths are different even for root mount namespace.
The first one (mountpoint) is the path, where the mount has to be mounted to
restore it.
The second one (ns_mountpoint) is the path, where mount will be located
_within__ container, and, thus, this pass has to be used to place real mount
to.
One more difference: "root" is not required anymore. Originally, path to mount
SPFS was constructed as follows:
SPFS_mnt_path = CT_root + mi->ns_mountpoint
Now mounts are created elsewhere and full path is defined in mi->mountpoint.
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
criu/spfs.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/criu/spfs.c b/criu/spfs.c
index f0c4da0..a5f6031 100644
--- a/criu/spfs.c
+++ b/criu/spfs.c
@@ -206,9 +206,11 @@ static int spfs_request_mount(int sock, struct mount_info *mi, const char *sourc
goto free_mountpoint;
}
- mount = xsprintf("mount;id=%d;mode=restore;mountpoint=%s;"
- "ns_pid=%d;root=%s", mi->mnt_id,
- mountpoint, root_item->pid->real, opts.root);
+ mount = xsprintf("mount;id=%d;mode=restore;"
+ "mountpoint=%s;ns_mountpoint=%s;"
+ "ns_pid=%d", mi->mnt_id,
+ mi->mountpoint, mi->ns_mountpoint,
+ root_item->pid->real);
if (!mount) {
pr_err("failed to allocate mount request\n");
goto free_freeze_cgroup;
More information about the Devel
mailing list