[sheepdog] [PATCH v3 0/4] variable vnodes specified by free space

levin li levin108 at gmail.com
Sat Aug 4 13:30:00 CEST 2012


From: levin li <xingke.lwp at taobao.com>

v2 ----> v3:
1. use 64bit integer for free disk space size
2. fix a bug which ignored gateway-only mode
3. fix a bug which miscalculating vnodes when there're gateway-only nodes

v1 ----> v2:
1. rebase to latest master
2. incremented SD_SHEEP_PROTO_VER since the sd_node is changed
3. recalculate vnodes number everytime we allocate vnode_info instead of
   only recalucating it at sd_join{leave}_handler, then we can use alloc_vnode_info
   freely without worrying about vnodes number, and indeed everytime we
   allocate a new vnode_info, the vnodes number all need to be recalculated. 
--------------------------------------
For sheep's first boot, we get the free disk space either by syscall
or by user's determination though command line argement, and then we
store the size into config file, and for later boot, we just read the
size from config file, the space size can never be changed after first
boot.

The free space size of every node is notified to every other node though
join message, and stored in sd_node, every time a new node joins or an
old node leaves, we recalculate the vnodes number for every nodes.

levin li (4):
  sheep: get the free disk space and store it in the config file
  sheep: add user-defined free disk space size
  sheep: recalculate the vnodes number when epoch changes
  sheep: remove command line argument --vnodes

 include/internal_proto.h |    3 +-
 sheep/cluster.h          |    1 +
 sheep/group.c            |   28 ++++++++++++++-
 sheep/sheep.c            |   24 +++++++------
 sheep/sheep_priv.h       |    3 ++
 sheep/store.c            |   89 ++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 136 insertions(+), 12 deletions(-)

-- 
1.7.10




More information about the sheepdog mailing list