mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
mount: Core for creating mount namespace
Namespace restore goes in two steps -- first, clean old mountpoints (except root) that are left after clone(CLONE_NEWNS) call. Next, repopulate the namespace with new mountpoints (except root) read from the image file. This patch adds the skeleton for the above -- reading the mountpoints from current proc and image and calling for mount/umount. The real action will come in further patches. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
@@ -124,6 +124,8 @@ int prepare_namespace(int pid, unsigned long clone_flags)
|
||||
ret = prepare_utsns(pid);
|
||||
if (clone_flags & CLONE_NEWIPC)
|
||||
ret = prepare_ipc_ns(pid);
|
||||
if (clone_flags & CLONE_NEWNS)
|
||||
ret = prepare_mnt_ns(pid);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user