Commit 2b4a8d29 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

mount: save group and master in image file (v2)

They are required for restoring shared and slave mounts

v2: use the same names of variables in image and in code
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent d00e7c6f
......@@ -523,6 +523,10 @@ static int dump_one_mountpoint(struct mount_info *pm, int fd)
me.mountpoint = pm->mountpoint;
me.source = pm->source;
me.options = pm->options;
me.shared_id = pm->shared_id;
me.has_shared_id = true;
me.master_id = pm->master_id;
me.has_master_id = true;
if (!me.fstype && !is_root_mount(pm)) {
pr_err("FS mnt %s dev %#x root %s unsupported\n",
......@@ -810,6 +814,8 @@ static int populate_mnt_ns(int ns_pid)
pm->parent_mnt_id = me->parent_mnt_id;
pm->s_dev = me->root_dev;
pm->flags = me->flags;
pm->shared_id = me->shared_id;
pm->master_id = me->master_id;
/* FIXME: abort unsupported early */
pm->fstype = decode_fstype(me->fstype);
......
......@@ -20,4 +20,7 @@ message mnt_entry {
required string mountpoint = 7;
required string source = 8;
required string options = 9;
optional uint32 shared_id = 10;
optional uint32 master_id = 11;
}
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