On 09/23/2016 08:56 AM, John Ferlan wrote: > Add support for a duration/length for the bps/iops and friends. > > Modify the API in order to add the "blkdeviotune." specific definitions > for the iotune throttling duration/length options > > total_bytes_sec_max_length > write_bytes_sec_max_length > read_bytes_sec_max_length > total_iops_sec_max_length > write_iops_sec_max_length > read_iops_sec_max_length > > Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> > --- > include/libvirt/libvirt-domain.h | 54 ++++++++++++++++++++ > src/conf/domain_conf.h | 6 +++ > src/qemu/qemu_driver.c | 106 ++++++++++++++++++++++++++++++++++++++- > src/qemu/qemu_monitor.c | 7 ++- > src/qemu/qemu_monitor.h | 3 +- > src/qemu/qemu_monitor_json.c | 25 ++++++++- > src/qemu/qemu_monitor_json.h | 3 +- > tests/qemumonitorjsontest.c | 17 ++++++- > 8 files changed, 211 insertions(+), 10 deletions(-) > While working on the "next" iotune tunable to add I realized something... [...] > > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c > index ee16cb5..3b04754 100644 > --- a/src/qemu/qemu_driver.c > +++ b/src/qemu/qemu_driver.c > @@ -113,7 +113,8 @@ VIR_LOG_INIT("qemu.qemu_driver"); > #define QEMU_NB_MEM_PARAM 3 > > #define QEMU_NB_BLOCK_IO_TUNE_PARAM 6 > -#define QEMU_NB_BLOCK_IO_TUNE_PARAM_MAX 13 > +#define QEMU_NB_BLOCK_IO_TUNE_PARAM_LENGTH 12 > +#define QEMU_NB_BLOCK_IO_TUNE_PARAM_MAX 19 These need to be: #define QEMU_NB_BLOCK_IO_TUNE_PARAM 6 #define QEMU_NB_BLOCK_IO_TUNE_PARAM_MAX 13 #define QEMU_NB_BLOCK_IO_TUNE_PARAM_MAX_LENGTH 19 Then [...] > @@ -17667,6 +17759,9 @@ qemuDomainGetBlockIoTune(virDomainPtr dom, > > if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DRIVE_IOTUNE_MAX)) > maxparams = QEMU_NB_BLOCK_IO_TUNE_PARAM; > + > + if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DRIVE_IOTUNE_MAX_LENGTH)) > + maxparams = QEMU_NB_BLOCK_IO_TUNE_PARAM_LENGTH; > } This should be : if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DRIVE_IOTUNE_MAX)) maxparams = QEMU_NB_BLOCK_IO_TUNE_PARAM; else if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DRIVE_IOTUNE_MAX_LENGTH)) maxparams = QEMU_NB_BLOCK_IO_TUNE_PARAM_MAX; The default is 19 (get everything)... If we don't have the IOTUNE_MAX cap, then there's only 6 parameters to get. If we don't have the IOTUNE_MAX_LENGTH cap, then there's only 13 parameters to get. John -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list