[CRIU] [PATCH 05/13] mounts: mark local root-s in the list of mount points

Andrey Vagin avagin at openvz.org
Tue Apr 8 17:13:33 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.

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 f6af7d3..c7d652b 100644
--- a/include/proc_parse.h
+++ b/include/proc_parse.h
@@ -114,6 +114,7 @@ struct mount_info {
 	bool		mounted;
 	bool		need_plugin;
 	int		is_file;
+	bool		is_root;
 	struct mount_info *next;
 
 	/* tree linkage */
diff --git a/mount.c b/mount.c
index 4844967..1a9230d 100644
--- a/mount.c
+++ b/mount.c
@@ -1384,6 +1384,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_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