[sheepdog] [PATCH] sheep: reinitialize conn->blocking_siblings after delete it

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Jun 28 10:56:18 CEST 2012


At Thu, 28 Jun 2012 16:00:22 +0800,
Yunkai Zhang wrote:
> 
> On Thu, Jun 28, 2012 at 3:05 PM, Liu Yuan <namei.unix at gmail.com> wrote:
> > On 06/28/2012 11:54 AM, Yunkai Zhang wrote:
> >>               if (!list_empty(&ci->conn.blocking_siblings))
> >
> > I don't think list_empty(entry) is valid check. Looks weird to me,
> > list_empty() is used to check if list is empty, not entry. It seems that
> > list.h doesn't provide helper to check if entry is in the list. We
> > should use other filed to check or provide a new dedicated helper.
> 
> I don't think so. Each _ENTRY_ of double-linked circular list has the
> same attributes. There are no differences between _HEAD_ and other
> entries. We can treat each _ENTRY_ as another _HEAD_, so why can't we
> use list_emtpy() to check it as long as we do the prepare work
> correctly?

It looks strange to me to use list_empty against entry, but we need a
fix for 0.4.0 release.  Yuan, how about merging this patch for now,
and cleaning up after the release?

Thanks,

Kazutaka



More information about the sheepdog mailing list