iowatcher: Fix some rounding errors around the max offset
authorChris Mason <chris.mason@fusionio.com>
Fri, 26 Oct 2012 19:23:40 +0000 (15:23 -0400)
committerChris Mason <clm@fb.com>
Wed, 24 Sep 2014 19:02:07 +0000 (12:02 -0700)
commit6c984075e39be376f159f831536a8c2dfd620e9a
tree358da40808e61736065988f9858e51bdd10ff718
parent79d615306f3a4146bb27d59c4b1707907099f669
iowatcher: Fix some rounding errors around the max offset

set_gdd_bit makes sure that we don't try to set bits past the max offset
we used to allocate our gdd array.

But, it only does this when the function is first called, and the whole
byte range for the IO we're recording may go past max offset.  This adds
a check to be sure we stay in the right range.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
iowatcher/main.c
iowatcher/plot.c