[Devel] Re: [RFC][PATCH 2/5] pid: Generalize task_active_pid_ns

2008-12-02 Thread Sukadev Bhattiprolu
Bastian Blank [EMAIL PROTECTED] wrote: | On Mon, Dec 01, 2008 at 01:15:18PM -0800, Sukadev Bhattiprolu wrote: | > Greg Kurz [EMAIL PROTECTED] wrote: | > | On Thu, 2008-11-27 at 02:17 +0100, Bastian Blank wrote: | > | > On Tue, Nov 25, 2008 at 07:45:28PM -0800, Sukadev Bhattiprolu wrote: | > | > > C

[Devel] [PATCH] Detect rsync failure

2008-12-02 Thread Nick Andrew
It is necessary to detect failure of the rsync command, but the exit status of the pipeline is the exit status of the last command, by default. So make it a single command. Signed-off-by: Nick Andrew <[EMAIL PROTECTED]> --- bin/vzmigrate.in |3 +-- 1 files changed, 1 insertions(+), 2 deletion

[Devel] Re: [RFC][PATCH 4/4] checkpoint/restart: simplify cr_scan_fds()

2008-12-02 Thread Serge E. Hallyn
Quoting Dave Hansen ([EMAIL PROTECTED]): > > I think having all the allocations in one place, plus the > reduction in the number of lines speaks for itself. In > any case, this is last in the series and can be dropped if > you don't like it. > > --- > > linux-2.6.git-dave/checkpoint/ckpt_file.

[Devel] Re: [PATCH 2/3] cgroups: add inactive subsystems to rootnode.root_list

2008-12-02 Thread Li Zefan
@@ -2522,6 +2522,7 @@ static void __init cgroup_init_subsys(struct cgroup_subsys *ss) printk(KERN_INFO "Initializing cgroup subsys %s\n", ss->name); /* Create the top cgroup state for this subsystem */ + list_add(&ss->sibling, &rootnode.root_list);

[Devel] Re: [RFC][PATCH 1/5] pid: Implement ns_of_pid

2008-12-02 Thread Valdis . Kletnieks
On Tue, 02 Dec 2008 12:58:41 +0100, Bastian Blank said: > pid is a function argument and the function does not call detach_pid. So > please try again. What he means is that if some *other* function calls detach_pid() and then something calls the ns_of_pid() function, it may be getting passed a nu

[Devel] Re: [PATCH 2/3] cgroups: add inactive subsystems to rootnode.root_list

2008-12-02 Thread Paul Menage
On Mon, Dec 1, 2008 at 7:24 PM, Li Zefan <[EMAIL PROTECTED]> wrote: > Paul Menage wrote: >> On Fri, Nov 28, 2008 at 2:02 AM, Li Zefan <[EMAIL PROTECTED]> wrote: >>> Though for an inactive hierarchy, we have subsys->root == &rootnode, >>> but rootnode's root_list is always empty. >> >> I think you m

[Devel] Re: [RFC][PATCH 2/4] checkpoint/restart: fix cr_ctx_checkpoint() locking

2008-12-02 Thread Dave Hansen
On Tue, 2008-12-02 at 17:22 -0500, Oren Laadan wrote: > any reason why you want to reference the entire ->fs instead of, as I > suggested, make a *copy* of ->fs->root and then reference its > contents ? This looked simpler to me. We're going to have to rip this sucker out anyway, so I went for wh

[Devel] Re: [RFC][PATCH 2/4] checkpoint/restart: fix cr_ctx_checkpoint() locking

2008-12-02 Thread Oren Laadan
any reason why you want to reference the entire ->fs instead of, as I suggested, make a *copy* of ->fs->root and then reference its contents ? Dave Hansen wrote: > The existing ctx->vfsroot is dangerous. We take it from > the root task via: ctx->root_task->fs->root and don't take > a ref on the

[Devel] Re: [PATCH 3/3] cgroups: introduce link_css_set() to remove duplicate code

2008-12-02 Thread Paul Menage
On Mon, Dec 1, 2008 at 7:18 PM, Li Zefan <[EMAIL PROTECTED]> wrote: > > How about: > > /** > * link_css_set - a helper function to link a css_set to a cgroup > * @ tmp_cg_links: cg_cgroup_link objects allocated by allocate_cg_links() > * @ cg: the css_set to be linked > * @ cgrp: the destinatio

[Devel] Re: [RFC][PATCH 1/5] pid: Implement ns_of_pid

2008-12-02 Thread Sukadev Bhattiprolu
Bastian Blank [EMAIL PROTECTED] wrote: | On Mon, Dec 01, 2008 at 12:24:22PM -0800, Sukadev Bhattiprolu wrote: | > Bastian Blank [EMAIL PROTECTED] wrote: | > | On Tue, Nov 25, 2008 at 07:44:42PM -0800, Sukadev Bhattiprolu wrote: | > | > +/* ns_of_pid returns the pid namespace in which the specified

[Devel] Re: [RFC][PATCH 4/5] Protect cinit from fatal signals

2008-12-02 Thread Sukadev Bhattiprolu
First of, thanks for taking the time to review/comment. Bastian Blank [EMAIL PROTECTED] wrote: | On Mon, Dec 01, 2008 at 12:21:12PM -0800, Sukadev Bhattiprolu wrote: | > Container-inits are special in some ways and this change requires SIGKILL | > to terminate them. | | No. They have are not spe

[Devel] Re: [RFC][PATCH 3/5] Determine if sender is from ancestor ns

2008-12-02 Thread Sukadev Bhattiprolu
Bastian Blank [EMAIL PROTECTED] wrote: | On Mon, Dec 01, 2008 at 12:15:06PM -0800, Sukadev Bhattiprolu wrote: | > Bastian Blank [EMAIL PROTECTED] wrote: | > | If I see this correctly this information is already covered in si_code | > | with SI_USER and SI_TKILL. SI_KERNEL is used for explicit kerne

[Devel] [RFC][PATCH 3/4] checkpoint/restart: fix 'struct file' references

2008-12-02 Thread Dave Hansen
We must hold a reference to 'file' when it get passed in to fd_install(). After fd_install() the entry in the fdtable takes on the reference. If we don't hold a reference to it, another thread can come along after fd_install() and fput() it before we've done the get_file(). In cr_read_fd_data()

[Devel] [RFC][PATCH 2/4] checkpoint/restart: fix cr_ctx_checkpoint() locking

2008-12-02 Thread Dave Hansen
The existing ctx->vfsroot is dangerous. We take it from the root task via: ctx->root_task->fs->root and don't take a ref on the 'fs' in there. We also take a ref on the fs.root which is worthless. So, replace ctx->vfsroot with a reference to the 'fs' instead. This gives us easy access to fs.ro

[Devel] [RFC][PATCH 1/4] checkpoint/restart: fix code to handle open symlinks

2008-12-02 Thread Dave Hansen
There's no such thing as an opened symlink. --- linux-2.6.git-dave/checkpoint/ckpt_file.c |3 --- linux-2.6.git-dave/checkpoint/rstr_file.c |1 - linux-2.6.git-dave/include/linux/checkpoint_hdr.h |1 - 3 files changed, 5 deletions(-) diff -puN checkpoint/ckpt_file.

[Devel] [RFC][PATCH 4/4] checkpoint/restart: simplify cr_scan_fds()

2008-12-02 Thread Dave Hansen
I think having all the allocations in one place, plus the reduction in the number of lines speaks for itself. In any case, this is last in the series and can be dropped if you don't like it. --- linux-2.6.git-dave/checkpoint/ckpt_file.c | 13 - 1 file changed, 4 insertions(+), 9

[Devel] Re: [RFC][PATCH 4/5] Protect cinit from fatal signals

2008-12-02 Thread Bastian Blank
On Mon, Dec 01, 2008 at 12:21:12PM -0800, Sukadev Bhattiprolu wrote: > Container-inits are special in some ways and this change requires SIGKILL > to terminate them. No. They have are not special from the outside namespace. Also it was discussed to use pid namespaces to preserve the local pid of

[Devel] Re: [RFC][PATCH 1/5] pid: Implement ns_of_pid

2008-12-02 Thread Bastian Blank
On Mon, Dec 01, 2008 at 12:24:22PM -0800, Sukadev Bhattiprolu wrote: > Bastian Blank [EMAIL PROTECTED] wrote: > | On Tue, Nov 25, 2008 at 07:44:42PM -0800, Sukadev Bhattiprolu wrote: > | > +/* ns_of_pid returns the pid namespace in which the specified > | > + * pid was allocated. > | > + */ > | > +

[Devel] Re: [RFC][PATCH 2/5] pid: Generalize task_active_pid_ns

2008-12-02 Thread Bastian Blank
On Mon, Dec 01, 2008 at 01:15:18PM -0800, Sukadev Bhattiprolu wrote: > Greg Kurz [EMAIL PROTECTED] wrote: > | On Thu, 2008-11-27 at 02:17 +0100, Bastian Blank wrote: > | > On Tue, Nov 25, 2008 at 07:45:28PM -0800, Sukadev Bhattiprolu wrote: > | > > Currently task_active_pid_ns is not safe to call a

[Devel] Re: [RFC][PATCH 3/5] Determine if sender is from ancestor ns

2008-12-02 Thread Bastian Blank
On Mon, Dec 01, 2008 at 12:15:06PM -0800, Sukadev Bhattiprolu wrote: > Bastian Blank [EMAIL PROTECTED] wrote: > | If I see this correctly this information is already covered in si_code > | with SI_USER and SI_TKILL. SI_KERNEL is used for explicit kernel > | generated signals. > > Yes, but si_code