[sheepdog] [PATCH 0/8] use rbtree to manage struct sd_node

Liu Yuan namei.unix at gmail.com
Fri Sep 13 12:06:32 CEST 2013


This is the second round of patch set that aims to remove the node max limit
that sheep can support.

No algorithm nor functionality changes, but involes a lot of api changes that
assume a static array of sd_nodes.

With this patch set, cluster driver will pass a rbtree of nodes directly to sheep
handlers and all the way down we'll play with rbtree instead of the old static
array.

I do not yet move static sd_nodes array in struct epoch_log and struct
cluster_info to dynamic structures. So basically we are still limited by max
node roof, but we are way close to get rid of it. This is planed to be done in
the final third patch set.

The final aim is that we can use zookeeper to support thousands of nodes.

Liu Yuan (8):
  sheep: remove bug_on for struct sd_node
  rbtree: make rb_for_each_entry and rb_for_each more generic
  sheep: remove local_idx in struct sd_rsp
  rbtree: add rb_copy helper
  sheep: don't check nodes information for joined nodes
  sheep: add option to disable shepherd driver
  sheep: use rbtree to manage struct sd_node
  group: add node to sockfd_cache as early as possible

 configure.ac              |   10 +++
 dog/dog.c                 |   14 ++-
 dog/dog.h                 |    2 +-
 dog/node.c                |   59 ++++++++-----
 dog/vdi.c                 |   15 ++--
 include/internal_proto.h  |   10 +--
 include/rbtree.h          |   23 +++--
 include/sheep.h           |   20 +++--
 include/sheepdog_proto.h  |    1 -
 include/sockfd_cache.h    |    2 +-
 lib/sockfd_cache.c        |   10 +--
 sheep/Makefile.am         |    6 +-
 sheep/cluster.h           |    6 +-
 sheep/cluster/corosync.c  |   25 +++---
 sheep/cluster/local.c     |   41 +++++----
 sheep/cluster/zookeeper.c |   50 +++++------
 sheep/group.c             |  214 ++++++++++++++++++++++-----------------------
 sheep/ops.c               |   16 ++--
 sheep/recovery.c          |   17 ++--
 sheep/sheep_priv.h        |    3 +-
 20 files changed, 300 insertions(+), 244 deletions(-)

-- 
1.7.9.5




More information about the sheepdog mailing list