[Devel] Re: [PATCH 2/3] c/r: Add UTS support (v6)

2009-04-05 Thread Oren Laadan
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,

[Devel] Re: [PATCH 2/3] c/r: Add UTS support (v6)

2009-04-02 Thread Serge E. Hallyn
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); +

[Devel] Re: [PATCH 2/3] c/r: Add UTS support (v6)

2009-04-02 Thread Dan Smith
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

[Devel] Re: [PATCH 2/3] c/r: Add UTS support (v6)

2009-04-02 Thread Serge E. Hallyn
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

[Devel] Re: [PATCH 2/3] c/r: Add UTS support (v6)

2009-04-02 Thread Dan Smith
+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

[Devel] Re: [PATCH 2/3] c/r: Add UTS support (v6)

2009-04-02 Thread Dan Smith
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

[Devel] Re: [PATCH 2/3] c/r: Add UTS support (v6)

2009-04-02 Thread Serge E. Hallyn
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