[libvirt] [PATCH 2/9] qemu: Add new throttle options to the structure _virDomainBlockIoTuneInfo.

Matthias Gatto matthias.gatto at outscale.com
Wed Aug 27 17:32:52 UTC 2014


Modify the structure _virDomainBlockIoTuneInfo to suport total_bytes_sec_max, write_bytes_sec_max,
read_bytes_sec_max, total_iops_sec_max, write_iops_sec_max, read_iops_sec_max, size_iops_sec options.

Add the bool suport_max_options in the sturture _virDomainBlockIoTuneInfo used to know
if the qemu binary suport the bps_max options and they friends.

Change the initialisation of the variable expectedInfo in the test file qemumonitorjsontest.c
to avoid compilling problem.

Signed-off-by: Matthias Gatto <matthias.gatto at outscale.com>
---
 src/conf/domain_conf.h      | 8 ++++++++
 tests/qemumonitorjsontest.c | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index ff7d640..5423523 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -606,6 +606,14 @@ struct _virDomainBlockIoTuneInfo {
     unsigned long long total_iops_sec;
     unsigned long long read_iops_sec;
     unsigned long long write_iops_sec;
+    unsigned long long total_bytes_sec_max;
+    unsigned long long read_bytes_sec_max;
+    unsigned long long write_bytes_sec_max;
+    unsigned long long total_iops_sec_max;
+    unsigned long long read_iops_sec_max;
+    unsigned long long write_iops_sec_max;
+    unsigned long long size_iops_sec;
+    bool suport_max_options;
 };
 typedef virDomainBlockIoTuneInfo *virDomainBlockIoTuneInfoPtr;
 
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index baee80a..5a2a337 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -1835,7 +1835,7 @@ testQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottle(const void *data)
     if (!test)
         return -1;
 
-    expectedInfo = (virDomainBlockIoTuneInfo) {1, 2, 3, 4, 5, 6};
+    expectedInfo = (virDomainBlockIoTuneInfo) {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, false};
 
     if (qemuMonitorTestAddItem(test, "query-block", queryBlockReply) < 0 ||
         qemuMonitorTestAddItemParams(test, "block_set_io_throttle",
-- 
1.8.3.1




More information about the libvir-list mailing list