[CRIU] Re: [PATCH 10/10] files: Use sys_kcmp to find file descriptor
duplicates
Cyrill Gorcunov
gorcunov at openvz.org
Tue Feb 28 09:09:38 EST 2012
On Tue, Feb 28, 2012 at 06:01:56PM +0400, Pavel Emelyanov wrote:
> On 02/28/2012 05:10 PM, Cyrill Gorcunov wrote:
> > On Tue, Feb 28, 2012 at 02:26:31PM +0400, Pavel Emelyanov wrote:
> >> On 02/27/2012 07:21 PM, Cyrill Gorcunov wrote:
> >>> On Mon, Feb 27, 2012 at 06:01:41PM +0400, Cyrill Gorcunov wrote:
> >>>>
> >>>> Yes, 0 will work as well but I would prefer to keep some predefined
> >>>> value other than 0 which actually gives us a good hint in debugging
> >>>> purpose.
> >>>>
> >>>
> >>> Does this one look better?
> >>
> >> Almost perfect. See comments inline.
> >>
> >
> > The final one.
>
> No, it's not :)
>
Bah! ;)
> > +
> > + sub->u.key.subid = fd_id_entries_subid++;
>
> It's already incremented in alloc_fd_id_entry :)
Sure, it's redundant, will drop.
>
> > + rb_link_and_balance(&e->subtree_root, &sub->subtree_node, parent, new);
>
> Plus, you can merge call to rb_link_and_balance into alloc_fd_id_entry (and rename
> the latter to better reflect what it's doing.
>
No, i better should not. The searches are done in different trees
(and as result different rb_link, parent and such will be there).
So I would prefer to not mess searching/linking code.
Cyrill
More information about the CRIU
mailing list