blkiomon: Fix an output error
authorTao Ma <boyu.mt@taobao.com>
Fri, 14 Jan 2011 08:06:03 +0000 (09:06 +0100)
committerJens Axboe <jaxboe@fusionio.com>
Fri, 14 Jan 2011 08:06:03 +0000 (09:06 +0100)
commitb7e74b0087fe5d687c6a43a01a2e02d60b618ae0
tree03fdf748971e174e7a886840037627c8a862be5b
parent5480f591a58df0e873ab80ba21e7b81b9a6fa0c5
blkiomon: Fix an output error

When we give out some statistics in blkiomon, we don't consider
the situation that the device has no correspoinding action. See
if there is no disk read during the interval, the output in my box is
like:
sizes read (bytes): num 0, min -1, max 0, sum 0, squ 0, avg nan, var nan

With the fix, now it looks like:
sizes read (bytes): num 0, min -1, max 0, sum 0, squ 0, avg 0.0, var 0.0

Cc: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
stats.h