Commit 66394645 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

files: save mnt_id for reg files

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 87b1f540
......@@ -22,6 +22,7 @@
#include "util.h"
#include "fs-magic.h"
#include "asm/atomic.h"
#include "namespaces.h"
#include "protobuf.h"
#include "protobuf/regfile.pb-c.h"
......@@ -557,6 +558,16 @@ int dump_one_reg_file(int lfd, u32 id, const struct fd_parms *p)
} else
link = p->link;
if (p->mnt_id >= 0 && (root_ns_mask & CLONE_NEWNS)) {
if (lookup_mnt_id(p->mnt_id) == NULL) {
pr_err("No mount for the %d file in the namespaces\n", p->mnt_id);
return -1;
}
rfe.mnt_id = p->mnt_id;
rfe.has_mnt_id = true;
}
pr_info("Dumping path for %d fd via self %d [%s]\n",
p->fd, lfd, &link->name[1]);
......
......@@ -6,4 +6,5 @@ message reg_file_entry {
required uint64 pos = 3;
required fown_entry fown = 5;
required string name = 6;
optional sint32 mnt_id = 7 [default = -1];
}
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