[Pacemaker] [Question] About the rotation of the pe-file.

Lars Ellenberg lars.ellenberg at linbit.com
Sat Jan 14 13:05:43 UTC 2012


On Fri, Jan 06, 2012 at 10:12:06AM +0900, renayama19661014 at ybb.ne.jp wrote:
> Hi Andrew,
> 
> Thank you for comments.
> 
> > Could you try with:
> > 
> >         while(max >= 0 && sequence > max) {
> > 
> 
> The problem is not settled by this correction.
> The rotation is carried out with a value except 0.

If you want it to be between [0, max-1],
obviously that should be
        while(max > 0 && sequence >= max) {
                sequence -= max;
        }

Though I wonder why not simply:
	if (max == 0)
		return;
	if (sequence > max)
		sequence = 0;


-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com




More information about the Pacemaker mailing list