From: Liu Yuan <tailai.ly at taobao.com> Get number of zones from the list. Signed-off-by: Liu Yuan <tailai.ly at taobao.com> --- sheep/group.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/sheep/group.c b/sheep/group.c index 59293b2..2871e97 100644 --- a/sheep/group.c +++ b/sheep/group.c @@ -210,6 +210,15 @@ static void build_node_list(struct list_head *node_list, *nr_nodes = nr; } +static int get_zones_nr_from(struct list_head *list) +{ + int nr_dummpy, nr_zones; + struct sheepdog_node_list_entry nodes[SD_MAX_NODES]; + + build_node_list(list, nodes, &nr_dummpy, &nr_zones); + return nr_zones; +} + int get_ordered_sd_node_list(struct sheepdog_node_list_entry *entries) { int nr_nodes; -- 1.7.6.1 |