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

levin li levin108 at gmail.com
Fri Aug 3 14:50:07 CEST 2012


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

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            |   24 ++++++++++++-
 sheep/sheep.c            |   22 +++++++-----
 sheep/sheep_priv.h       |    3 ++
 sheep/store.c            |   86 ++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 128 insertions(+), 11 deletions(-)




More information about the sheepdog mailing list