Dan Smith wrote:
SH One thing to note is that this will drive the ns cgroup bananas.
SH It might still be worthwhile collecting the flags for all the
SH to-be-unshared namespaces, and then doing all of the unsharing at
SH once.
Okay, that's fair.
SH Futhermore, you do sys_unshare here,
Quoting Dan Smith (da...@us.ibm.com):
+static int cr_restore_utsns(struct cr_ctx *ctx, int ref)
+{
+ struct uts_namespace *uts;
+ int ret;
+
+ uts = cr_obj_get_by_ref(ctx, ref, CR_OBJ_UTSNS);
+ if (uts == NULL) {
+ ret = cr_read_utsns(ctx, current);
+
SH One thing to note is that this will drive the ns cgroup bananas.
SH It might still be worthwhile collecting the flags for all the
SH to-be-unshared namespaces, and then doing all of the unsharing at
SH once.
Okay, that's fair.
SH Futhermore, you do sys_unshare here, then further down you do
Quoting Dan Smith (da...@us.ibm.com):
This patch adds a phase of checkpoint that saves out information about any
namespaces the task(s) may have. Do this by tracking the namespace objects
of the tasks and making sure that tasks with the same namespace that follow
get properly referenced in
+uts = cr_obj_add_ptr(ctx, nsp-uts_ns, hh-uts_ref, CR_OBJ_UTSNS, 0);
SH I would prefer this be called 'uts_was_new' or something, though.
Fair enough. I was trying to avoid wrapping that line :)
SH Should probably memset them to 0 first. I realize it doesn't
SH really seem like
SH Actually, I think you must make sure the user didn't slip in a
SH nodename_len which was sizeof(ns-name.nodename).
Indeed, thanks.
--
Dan Smith
IBM Linux Technology Center
email: da...@us.ibm.com
___
Containers mailing list
Quoting Dan Smith (da...@us.ibm.com):
This patch adds a phase of checkpoint that saves out information about any
namespaces the task(s) may have. Do this by tracking the namespace objects
of the tasks and making sure that tasks with the same namespace that follow
get properly referenced in