[CRIU] [PATCH 05/39] mounts: mark local root-s in the list of mount points (v2)
Andrey Vagin
avagin at openvz.org
Mon Apr 21 07:23:15 PDT 2014
We are going to dump nested mount namespaces. All sub-namespaces will be
restored as sub-mounts in the root mount namespace. So mi->mountpoint
will be not '/' even if a mount is root for its mntns.
v2: s/is_root/is_ns_root/
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
include/proc_parse.h | 1 +
mount.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/include/proc_parse.h b/include/proc_parse.h
index 651c6a0..3629455 100644
--- a/include/proc_parse.h
+++ b/include/proc_parse.h
@@ -119,6 +119,7 @@ struct mount_info {
bool mounted;
bool need_plugin;
int is_file;
+ bool is_ns_root;
struct mount_info *next;
/* tree linkage */
diff --git a/mount.c b/mount.c
index 30fa96a..24032d3 100644
--- a/mount.c
+++ b/mount.c
@@ -1405,6 +1405,7 @@ static struct mount_info *read_mnt_ns_img(int ns_pid)
pm->shared_id = me->shared_id;
pm->master_id = me->master_id;
pm->need_plugin = me->with_plugin;
+ pm->is_ns_root = is_root(me->mountpoint);
/* FIXME: abort unsupported early */
pm->fstype = decode_fstype(me->fstype);
--
1.8.5.3
More information about the CRIU
mailing list