[OpenAFS-devel] Re: pthreading the bosserver

Jeffrey Hutzelman jhutz@cmu.edu
Fri, 09 Aug 2013 12:37:50 -0400


On Fri, 2013-08-09 at 12:26 -0400, Benjamin Kaduk wrote:
> On Thu, 8 Aug 2013, Jeffrey Hutzelman wrote:
> 
> > On Thu, 2013-08-08 at 19:57 -0400, Benjamin Kaduk wrote:
> >
> >> I'm not sure that things will need to be able to block.  Returning BZBUSY
> >> for BOZO_CreateBnode while we're waiting for shutdown seems fine, to me.
> >> Maybe there are internal cases which would need to block, but I don't
> >> remember any off the top of my head.
> >
> >
> > During shutdown, yes.  During restart-all, those operations should
> > succeed.  Bonus points if you arrange so that CreateBnode during
> 
> Is there justification for requiring these operations to succeed during 
> restart-all which is stronger than "jhutz wants it"?

Because having RPCs that exhibit nonreproducible transient errors sucks?
I mean, it's one thing if the bosserver is shutting down.  But if not,
then why should an operation fail when it can just wait?

I mean, if we're looking for ideal behavior, then something that wants
to traverse the entire list while blocking should make a copy or
something.  But this doesn't even have to do that -- why does it need
the list not to change?  Keep a ref on the one you're working with, and
hold the lock only while following the next pointer.  If something got
tacked on to the start while you were working, it doesn't get restarted;
that's probably OK.  If something got removed, then it didn't need to be
restarted anyway.