[sheepdog] [PATCH v5 0/2] move sockfd to libsheepdog

Hitoshi Mitake mitake.hitoshi at gmail.com
Wed Jul 31 03:49:40 CEST 2013


At Mon, 29 Jul 2013 16:39:48 +0800,
Liu Yuan wrote:
> 
> On Sat, Jul 27, 2013 at 10:57:33PM +0900, Hitoshi Mitake wrote:
> > We will make big changes in the near future:
> > 1. Improve some subcommands of collie for more
> >    scalability. e.g. collie vdi list takes long time on a
> >    sheepdog cluster which consists many VDIs.
> > 
> > 2. Let sheep and collie handle EMFILE gracefully. We will implement
> >    wrappers for functions which create new fd (e.g. xopen() for
> >    open()).
> > 
> > Before doing them, moving sockfd cache from sheep to libsheepdog is
> > required. This patchset does this moving and prepares for the above
> > changes.
> > 
> > v5:
> >  - make the workqueue for cachefd growth an internal thing in
> >    lib/sockfd_cache.c
> >  - remove revalidate_node(), because this relies on the assumption of
> >    sheep
> >  - better naming of functions
> >  - misc cleanings
> > 
> 
> Just by a glance of this version, I think you didn't address my comment yet:
> 
>    You need explicitely add a node in the cache in the collie, because
>    sockfd_cache_add() should fail if we don't have this node in cache.
>    The corner case is that sheep sometimes call sockfd_cache_add() without
>    node in cache, in this case we need to regrab it if requested node is
>    revalidated because of false deleted due to timeout.
> 
>    Collie doesn't need to handle above corner case because it never false
>    timeout.
> 
> For a second thought, I thhink your previous trick that rely on the sockfd cache
> to reconnect to a revalidated node looks fine and save the call of add node.
> 
> After all, you can't remove revalidate_node() from sockfd cache.

I removed revalidate_node() because collie doesn't rely on it and I
couldn't care about the above corner case. But it was a mistake.

I'll recover it in the next version. It doesn't harm collie's
behavior.

Thanks,
Hitoshi



More information about the sheepdog mailing list