Add a value in the enum virQEMUCapsFlags for the qemu capability.
Set it with virQEMUCapsSet if the binary suport bps_max and they friends.
Signed-off-by: Matthias Gatto <matthias.gatto(a)outscale.com>
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata/caps_2.1.1-1.caps | 1 +
3 files changed, 4 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index a409aaf..b73d520 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -270,6 +270,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"splash-timeout", /* 175 */
"iothread",
"migrate-rdma",
+ "drive-iotune-max",
);
@@ -2448,6 +2449,7 @@ static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] =
{
{ "spice", "disable-agent-file-xfer",
QEMU_CAPS_SPICE_FILE_XFER_DISABLE },
{ "msg", "timestamp", QEMU_CAPS_MSG_TIMESTAMP },
{ "numa", NULL, QEMU_CAPS_NUMA },
+ { "drive", "throttling.bps-total-max",
QEMU_CAPS_DRIVE_IOTUNE_MAX},
};
static int
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index a0bb5d3..9778be5 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -217,6 +217,7 @@ typedef enum {
QEMU_CAPS_SPLASH_TIMEOUT = 175, /* -boot splash-time */
QEMU_CAPS_OBJECT_IOTHREAD = 176, /* -object iothread */
QEMU_CAPS_MIGRATE_RDMA = 177, /* have rdma migration */
+ QEMU_CAPS_DRIVE_IOTUNE_MAX = 178, /* -drive bps_max= and friends */
QEMU_CAPS_LAST, /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_2.1.1-1.caps
b/tests/qemucapabilitiesdata/caps_2.1.1-1.caps
index 71d2459..fadfbb0 100644
--- a/tests/qemucapabilitiesdata/caps_2.1.1-1.caps
+++ b/tests/qemucapabilitiesdata/caps_2.1.1-1.caps
@@ -159,4 +159,5 @@
<flag name='splash-timeout'/>
<flag name='iothread'/>
<flag name='migrate-rdma'/>
+ <flag name='drive-iotune-max'/>
</qemuCaps>
--
1.8.3.1