Commit 84c48e62 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

mounts: Mark ns' roots in the list of mount points (v2)

When we'll restore nested mount namespaces, all but root ones (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: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent eac46292
...@@ -119,6 +119,7 @@ struct mount_info { ...@@ -119,6 +119,7 @@ struct mount_info {
bool mounted; bool mounted;
bool need_plugin; bool need_plugin;
int is_file; int is_file;
bool is_ns_root;
struct mount_info *next; struct mount_info *next;
/* tree linkage */ /* tree linkage */
......
...@@ -1405,6 +1405,7 @@ static struct mount_info *read_mnt_ns_img(int ns_pid) ...@@ -1405,6 +1405,7 @@ static struct mount_info *read_mnt_ns_img(int ns_pid)
pm->shared_id = me->shared_id; pm->shared_id = me->shared_id;
pm->master_id = me->master_id; pm->master_id = me->master_id;
pm->need_plugin = me->with_plugin; pm->need_plugin = me->with_plugin;
pm->is_ns_root = is_root(me->mountpoint);
/* FIXME: abort unsupported early */ /* FIXME: abort unsupported early */
pm->fstype = decode_fstype(me->fstype); pm->fstype = decode_fstype(me->fstype);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment