Commit 36d8c40c authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

namespace: add real pid to nsid

Before we dumped namespace of the root task only.
Now we are going to dump nested namespaces, so we need to know a pid of
any process, which lives in the target namespace.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 07930a8d
...@@ -113,6 +113,7 @@ int restore_ns(int rst, struct ns_desc *nd) ...@@ -113,6 +113,7 @@ int restore_ns(int rst, struct ns_desc *nd)
struct ns_id { struct ns_id {
unsigned int kid; unsigned int kid;
unsigned int id; unsigned int id;
pid_t pid;
struct ns_desc *nd; struct ns_desc *nd;
struct ns_id *next; struct ns_id *next;
}; };
...@@ -161,6 +162,7 @@ static unsigned int generate_ns_id(int pid, unsigned int kid, struct ns_desc *nd ...@@ -161,6 +162,7 @@ static unsigned int generate_ns_id(int pid, unsigned int kid, struct ns_desc *nd
nsid->kid = kid; nsid->kid = kid;
nsid->nd = nd; nsid->nd = nd;
nsid->next = ns_ids; nsid->next = ns_ids;
nsid->pid = pid;
ns_ids = nsid; ns_ids = nsid;
pr_info("Collected %u.%s namespace\n", nsid->id, nd->str); pr_info("Collected %u.%s namespace\n", nsid->id, nd->str);
......
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