This patch set introduce a new cluster status into sheepdog, which is supposed to prevent sheepdog from serving IO when lack of redundant nodes. Changes from v4 to v5 are: - rebased on the msater branch - add get/set_cluster_flags() - revert hdr flags into uint16_t - use Macro in set_nohalt() Changes from v3 to v4 are: - change hdr flags into uint32_t from uint16_t Changes from v2 to v3 are: - add a new flag field in struct cluster_info and NOHALT uses one bit of it. - use hdr.flags to set the nohalt option in collie. - add a new epoch_log_read_nr() to return # of the entries instead of bytes. Changes from v1 to v2 are: - refactor's get_cluster_status() to prepare the code for change. - address Kazutaka's comments. - make cluster 'halt' optionally. Liu Yuan (7): sheep: add a helper epoch_log_read_nr() sheep: refactor get_cluster_status() sheep: remove wrong 'unknown message' in the log sheep: introduce SD_STATUS_HALT sheep: add a helper function to get nr_zones sheep: add set/get_cluster_status() sheep: use SD_STATUS_HALT to stop serving IO collie/cluster.c | 14 +++- collie/collie.c | 1 + include/sheep.h | 3 + include/sheepdog_proto.h | 1 + sheep/group.c | 228 +++++++++++++++++++++++++++++----------------- sheep/sheep_priv.h | 7 ++ sheep/store.c | 46 +++++++++ 7 files changed, 214 insertions(+), 86 deletions(-) Thanks, Yuan |