[Sheepdog] [PATCH 1/2] sheep: sheep: handle node change event first

MORITA Kazutaka morita.kazutaka at gmail.com
Sun Apr 1 08:46:57 CEST 2012


At Sun, 01 Apr 2012 14:25:28 +0800,
Liu Yuan wrote:
> 
> On 04/01/2012 02:21 PM, MORITA Kazutaka wrote:
> 
> > At Sun, 01 Apr 2012 14:06:54 +0800,
> > Liu Yuan wrote:
> >>
> >> On 04/01/2012 01:59 PM, MORITA Kazutaka wrote:
> >>
> >>> 'join C' is processed after there is no outstanding I/Os.
> >>>
> >>
> >>
> >> Okay, I see the race.
> >>
> >> can we remove this line in start_cpg_event_work()
> >>
> >>         if (is_membership_change_event(cevent->ctype) &&
> >> sys->nr_outstanding_io)
> >>                 return;
> > 
> > No, Sheepdog assumes that the older epoch directories are read-only
> > (especially in recovery codes), so we need to flush all I/Os before
> > updating an epoch.  I think it is much harder to remove this line than
> > introducing two queues.
> > 
> 
> 
> How about flushing the IO before inserting the Join/Leave Event at the
> head?  That is, before inserting, we check
> 	if sys->nr_outstanding_io == 0
> 
> This can be thought as move this line in front of inserting.

I don't think the approach can guarantee that all nodes process the
membership events in the same order because some nodes may have
outstanding I/Os but the others may not.

If you think the above approach works well, I'd like to see the patch.
But it looks weird to me to push items to the head of a FIFO queue.


Thanks,

Kazutaka



More information about the sheepdog mailing list