[sheepdog] [Sheepdog] [PATCH] sheep: remove unregister_event from process_event_queue()

Christoph Hellwig hch at infradead.org
Wed May 16 05:54:26 CEST 2012


On Wed, May 16, 2012 at 11:53:00AM +0800, Yunkai Zhang wrote:
> On Wed, May 16, 2012 at 3:55 AM, Christoph Hellwig <hch at infradead.org> wrote:
> > On Wed, May 16, 2012 at 01:54:06AM +0800, Yunkai Zhang wrote:
> >> +static void get_vdi_bitmap_from_sd_list(struct sd_node *nodes, size_t nr_nodes)
> >> ?{
> >> ? ? ? int i;
> >> ? ? ? /* fixme: we need this until starting up. */
> >>
> >> - ? ? for (i = 0; i < sys->nr_nodes; i++)
> >> - ? ? ? ? ? ? get_vdi_bitmap_from(sys->nodes + i);
> >> + ? ? for (i = 0; i < nr_nodes; i++)
> >> + ? ? ? ? ? ? get_vdi_bitmap_from(nodes + i);
> >> ?}
> >
> > I'd suggest to simply kill get_vdi_bitmap_from_sd_list and opencode it
> > in __sd_join to make the code cleaner.
> 
> I'm also confused by this code. Obviously, the for loop after
> get_vdi_bitmap_from_sd_list() do a lot of duplicated works, Maybe this
> code is outdated, but I need more testing to clean it, I'll have a
> try.

Maybe let's sort this code out first in a separate patch, with its own
description and testing?




More information about the sheepdog mailing list