[sheepdog] [PATCH v5 0/2] move sockfd to libsheepdog
Liu Yuan
namei.unix at gmail.com
Mon Jul 29 10:39:48 CEST 2013
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.
Thanks
Yuan
More information about the sheepdog
mailing list