[sheepdog] [PATCH v2 3/4] sheep: add support for manual recovery

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Wed Sep 12 11:50:06 CEST 2012


At Wed, 12 Sep 2012 16:21:13 +0800,
Liu Yuan wrote:
> 
> On 09/12/2012 03:05 PM, MORITA Kazutaka wrote:
> >  }
> >  
> > +/*
> > + * When automatic object recovery is disabled, the behavior of the
> > + * recovery process is like 'lazy recovery'.  This function returns
> > + * true if the recovery queue contains objects being accessed by
> > + * clients.  Sheep recovers such objects for availability even when
> > + * automatic object recovery is not enabled.
> > + */
> > +static bool has_scheduled_objects(struct recovery_work *rw)
> > +{
> > +	return rw->nr_scheduled_prio_oids <= rw->done;
> > +}
> > +
> 
> Well, if this function returns true when we have objects scheduled, then
> below if conditions should be:
> 
> if (sys->disable_recovery && !has_scheduled_objects(rw))
> 
> no?

Oops, yes, and has_scheduled_objects should be

static bool has_scheduled_objects(struct recovery_work *rw)
{
	return rw->done < rw->nr_scheduled_prio_oids;
}

Thanks,

Kazutaka



More information about the sheepdog mailing list