On Fri, Jan 10, 2014 at 03:20:44PM +0900, Hitoshi Mitake wrote: > New "dog vdi check" requires a number of zones. This patch lets dog > caliculate a number of zones when a subcommand has a flag > CMD_NEED_NODELIST. > > Reported-by: Marcin Mirosław <marcin at mejor.pl> > Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp> > --- > dog/dog.c | 13 +++++++++++++ > dog/dog.h | 1 + > 2 files changed, 14 insertions(+) > > diff --git a/dog/dog.c b/dog/dog.c > index 8e3c4d4..54360b5 100644 > --- a/dog/dog.c > +++ b/dog/dog.c > @@ -53,6 +53,9 @@ uint32_t sd_epoch; > int sd_nodes_nr; > struct rb_root sd_vroot = RB_ROOT; > struct rb_root sd_nroot = RB_ROOT; > +int zones_nr; sd_zones_nr is better. > + /* a number of zones never exceeds a number of nodes */ > +static uint32_t occured_zones[SD_MAX_NODES]; sd_zones is better. Thanks Yuan |