This breaks binary compatibility within the protocol. It is also completely unsavory to me.
Finally what is the advantage of converting negative nodeids to positive ones? I really think the likelyhood of this patch ever being accepted is pretty close to zero :) Regards, -steve On Wed, 2008-08-20 at 10:10 +0200, Andrew Beekhof wrote: > I'm sure this will be an unpopular patch, however there are good > reasons for it. > > Although OpenAIS uses uint32_t for node ids, both the in-kernel and > userspace pieces of the DLM use int32_t. > I'm also told that the chances of the kernel pieces changing approach > zero. > > So because the kernel is using signed ints, other pieces of the RedHat > stack also use signed ints, clusters are unlikely to span the entire > ipv4 address space (thus making dups unlikely) and that nodeids can be > manually assigned even if a dup occurs... I propose the following > patch that converts any negative nodeid back into a positive one. > > http://hg.clusterlabs.org/extra/openais/whitetank/raw-rev/b6a7886a3e90 > > diff -r 70c18fd72ea9 -r b6a7886a3e90 exec/totemnet.c > --- a/exec/totemnet.c Thu Aug 14 07:31:36 2008 +0200 > +++ b/exec/totemnet.c Mon Aug 18 12:17:10 2008 +0200 > @@ -702,7 +702,12 @@ static int netif_determine ( > * field is only 32 bits. > */ > if (bound_to->family == AF_INET && bound_to->nodeid == 0) { > - memcpy (&bound_to->nodeid, bound_to->addr, sizeof (int)); > + int nodeid = 0; > + memcpy (&nodeid, bound_to->addr, sizeof (int)); > + if(nodeid < 0) { > + nodeid = 0 - nodeid; > + } > + bound_to->nodeid = nodeid; > } > > return (res); > > _______________________________________________ > Openais mailing list > [email protected] > https://lists.linux-foundation.org/mailman/listinfo/openais _______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
