From b40d510cf534b6fa1acb827ed7c26bcdebc5fd36 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Wed, 30 Mar 2011 00:28:29 +0000 Subject: io-stats list: init counter to 0 for counting members By setting init the counter cnt to -1, we were loosing 1 entry when displaying the list on the cli. Signed-off-by: shishir gowda Signed-off-by: Vijay Bellur BUG: 2606 (gluster volume top open lists only 99 entries) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2606 --- xlators/debug/io-stats/src/io-stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/debug') diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c index 5e0aef84f..863f77a2a 100644 --- a/xlators/debug/io-stats/src/io-stats.c +++ b/xlators/debug/io-stats/src/io-stats.c @@ -988,7 +988,7 @@ io_stats_dump_stats_to_dict (xlator_t *this, dict_t *resp, ios_stats_type_t flags, int32_t list_cnt) { struct ios_conf *conf = NULL; - int cnt = -1; + int cnt = 0; char key[256]; struct ios_stat_head *list_head = NULL; struct ios_stat_list *entry = NULL; -- cgit