[sheepdog] [PATCH v2 04/11] sheep: don't check nodes information for joined nodes

Hitoshi Mitake mitake.hitoshi at gmail.com
Wed Sep 18 06:18:52 CEST 2013


At Wed, 18 Sep 2013 11:55:56 +0800,
Liu Yuan wrote:
> 
> On Wed, Sep 18, 2013 at 01:42:40AM +0900, Hitoshi Mitake wrote:
> > At Sat, 14 Sep 2013 18:34:24 +0800,
> > Liu Yuan wrote:
> > > 
> > > cluster_join_check is basically used to check newly joining node. But the old
> > > code also check the nodes states passed by cinfo with sys->cinfo. After we have
> > > struct rb_node rb in the sd_node, we'll never have this check passed.
> > > 
> > > Instead of doing the check with more complex code, this patch simply remove the
> > > check since nodes states in the joined nodes are always the same.
> > 
> > If these states are always identical, we can eliminate
> > cluster_info_copy(&sys->cinfo, cinfo); in sd_accept_handler().
> > 
> > I think eliminating the check is correct, but the actual reason is
> > that the check isn't meaningful in the current code. The commit log
> > isn't correct.
> 
> No, I think we can't remove cluster_info_copy(&sys->cinfo, cinfo) because we
> need to keep sys->cinfo on all the nodes having the same data. I am not 100%
> sure about if the check makes sense, but

I agree with eliminating the check and keeping the call of cluster_info_copy().

> 
> "nodes states in the joined nodes are always the same." aren't the reason?

If these are really identical things, copy isn't required. The actual
reason would be "the check is obsolete in current code", I think.

Thanks,
Hitoshi



More information about the sheepdog mailing list