Modify _virDomainBlockIoTuneInfo and rng schema to support the _length
options for bps/iops throttling values. Document the new values.
Signed-off-by: John Ferlan
---
docs/formatdomain.html.in | 40 -
docs/schemas/domaincommon.rng | 38 +
src/conf/domain_conf.c | 24 +++-
.../qemuxml2argv-blkdeviotune-max-length.xml | 65 ++
.../qemuxml2xmlout-blkdeviotune-max-length.xml | 1 +
tests/qemuxml2xmltest.c| 1 +
6 files changed, 166 insertions(+), 3 deletions(-)
create mode 100644
tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-max-length.xml
create mode 12
tests/qemuxml2xmloutdata/qemuxml2xmlout-blkdeviotune-max-length.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 1266e9d..274b9bb 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2617,7 +2617,45 @@
maximum write I/O operations per second.
size_iops_sec
The optional size_iops_sec element is the
-size of I/O operations per second.
+size of I/O operations per second.
+
+Throughput limits since 1.2.11 and QEMU
1.7
+
+
+ total_bytes_sec_max_length
+ The optional total_bytes_sec_max_length
+element is the maximum duration in seconds for the
+total_bytes_sec_max burst period. Only valid
+when the total_bytes_sec_max is set.
+ read_bytes_sec_max_length
+ The optional read_bytes_sec_max_length
+element is the maximum duration in seconds for the
+read_bytes_sec_max burst period. Only valid
+when the read_bytes_sec_max is set.
+ write_bytes_sec_max
+ The optional write_bytes_sec_max_length
+element is the maximum duration in seconds for the
+write_bytes_sec_max burst period. Only valid
+when the if write_bytes_sec_max is set.
+ total_iops_sec_max_length
+ The optional total_iops_sec_max_length
+element is the maximum duration in seconds for the
+total_iops_sec_max burst period. Only valid
+when the total_iops_sec_max is set.
+ read_iops_sec_max_length
+ The optional read_iops_sec_max_length
+element is the maximum duration in seconds for the
+read_iops_sec_max burst period. Only valid
+when the read_iops_sec_max is set.
+ write_iops_sec_max
+ The optional write_iops_sec_max_length
+element is the maximum duration in seconds for the
+write_iops_sec_max burst period. Only valid
+when the write_iops_sec_max is set.
+
+Throughput length since 2.4.0 and QEMU
2.6
+
+
driver
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 6eeb4e9..d648702 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -4960,6 +4960,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6a772c6..9dce51d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7137,7 +7137,7 @@ virDomainDiskBackingStoreParse(xmlXPathContextPtr ctxt,
virReportError(VIR_ERR_XML_ERROR,
\
_("disk iotune field '%s' must be an integer"), #val);
\
return -1;
\
-}
+}
\
static int
virDomainDiskDefIotuneParse(virDomainDiskDefPtr def,
@@ -7159,6 +7159,13 @@ virDomainDiskDefIotuneParse(virDomainDiskDefPtr def,
PARSE_IOTUNE(size_iops_sec);
+PARSE_IOTUNE(total_bytes_sec_max_length);
+PARSE_IOTUNE(read_bytes_sec_max_length);
+PARSE_IOTUNE(write_bytes_sec_max_length);
+PARSE_IOTUNE(total_iops_sec_max_length);
+PARSE_IOTUNE(read_iops_sec_max_length);
+PARSE_IOTUNE(write_iops_sec_max_length);
+
if ((def->blkdeviotune.total_bytes_sec &&
def->blkdeviotune.read_bytes_sec) ||
(def->blkdeviotune.total_bytes_sec &&
@@ -20272,7