On 08/24/2017 08:24 AM, Alberto Garcia wrote: > Both the throttling limits set with the throttling.iops-* and > throttling.bps-* options and their QMP equivalents defined in the > BlockIOThrottle struct are integer values. > > Those limits are also reported in the BlockDeviceInfo struct and they > are integers there as well. > > Therefore there's no reason to store them internally as double and do > the conversion everytime we're setting or querying them, so this patch > uses uint64_t for those types. Let's also use an unsigned type because > we don't allow negative values anyway. > > LeakyBucket.level and LeakyBucket.burst_level do however remain double > because their value changes depending on the fraction of time elapsed > since the previous I/O operation. > > Signed-off-by: Alberto Garcia <be...@igalia.com> > --- > include/qemu/throttle.h | 4 ++-- > tests/test-throttle.c | 3 ++- > util/throttle.c | 7 +++---- > 3 files changed, 7 insertions(+), 7 deletions(-) >
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature