[RFC PATCH 00/16] qemu: Expose 'limits' and 'timed_stats' block device statistics via bulk stats API
This series is RFC as there's pending QEMU work enabling either of the groups: For the limits the following qemu patches are needed: https://lists.nongnu.org/archive/html/qemu-block/2025-09/msg00804.html For timed stats, the statistics already exist but can't be enabled without: https://lists.nongnu.org/archive/html/qemu-block/2025-10/msg00040.html Patches 1-8 are cleanups and refactors Patches 9-10 extract and expose the block backing file limits. Patches 11-12 extract and expose the timed statistics Patch 13 is qemu capabilities update with the necessary changes and is not to be merged upstream; will be replaced by a proper update. Patches 14-16 add infrastructure to enable timed stats. Peter Krempa (16): qemu: monitor: Remove qemuMonitorQueryBlockstats qemu_monitor_json.c: Use consistent function hader coding style qemu_monitor_json.h: Use consistent function hader coding style qemu: monitor: Rework qemuBlockStats into a g_object qemuMigrationCookieAddNBD: Use qemuBlockGetNamedNodeData to fetch the capacities qemuMonitorJSONBlockStatsUpdateCapacityData: Merge into caller qemuMonitorJSONGetAllBlockStatsInfo: Directly probe data from 'query-named-block-nodes' Remove qemuMonitorBlockStatsUpdateCapacityBlockdev qemu: monitor: Extract block limit values Expose qemu storage request limits via bulk stats API qemu_monitor: Extract 'timed_stats' of block devices Expose qemu timed block statistics via bulk stats API DO_NOT_MERGE: Update qemu capabilities after adding patches for block limits and timed stats qemu: capabilities: Introduce QEMU_CAPS_DISK_TIMED_STATS conf: Add configuration option for timed disk statistics collection qemu: Add support for enabling timed block device statistics collection docs/formatdomain.rst | 17 + docs/manpages/virsh.rst | 54 + include/libvirt/libvirt-domain.h | 326 ++++ src/conf/domain_conf.c | 34 + src/conf/domain_conf.h | 2 + src/conf/schemas/domaincommon.rng | 11 + src/qemu/qemu_capabilities.c | 5 + src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 15 + src/qemu/qemu_driver.c | 203 ++- src/qemu/qemu_migration_cookie.c | 17 +- src/qemu/qemu_monitor.c | 58 +- src/qemu/qemu_monitor.h | 1191 ++++++++------ src/qemu/qemu_monitor_json.c | 607 +++++--- src/qemu/qemu_monitor_json.h | 6 - src/qemu/qemu_validate.c | 29 + .../caps_10.2.0_x86_64.replies | 1373 +++++++++-------- .../caps_10.2.0_x86_64.xml | 3 +- tests/qemumonitorjsontest.c | 2 + ...sk-statistics-intervals.x86_64-latest.args | 37 + ...isk-statistics-intervals.x86_64-latest.xml | 57 + .../disk-statistics-intervals.xml | 46 + tests/qemuxmlconftest.c | 1 + 23 files changed, 2686 insertions(+), 1409 deletions(-) create mode 100644 tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.args create mode 100644 tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/disk-statistics-intervals.xml -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> Unused since v8.6.0-154-g75a0fbe420 Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_monitor.c | 15 --------------- src/qemu/qemu_monitor.h | 2 -- src/qemu/qemu_monitor_json.c | 2 +- src/qemu/qemu_monitor_json.h | 3 --- 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 2fc883e8a6..7b09792c5d 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1967,21 +1967,6 @@ qemuMonitorGetBlockInfo(qemuMonitor *mon) } -/** - * qemuMonitorQueryBlockstats: - * @mon: monitor object - * - * Returns data from a call to 'query-blockstats' without using 'query-nodes' - */ -virJSONValue * -qemuMonitorQueryBlockstats(qemuMonitor *mon) -{ - QEMU_CHECK_MONITOR_NULL(mon); - - return qemuMonitorJSONQueryBlockstats(mon, false); -} - - /** * qemuMonitorGetAllBlockStatsInfo: * @mon: monitor object diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 8ef85ceb0a..6427fd42cd 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -677,8 +677,6 @@ int qemuMonitorSetMemoryStatsPeriod(qemuMonitor *mon, int qemuMonitorBlockIOStatusToError(const char *status); GHashTable *qemuMonitorGetBlockInfo(qemuMonitor *mon); -virJSONValue *qemuMonitorQueryBlockstats(qemuMonitor *mon); - typedef struct _qemuBlockStats qemuBlockStats; struct _qemuBlockStats { unsigned long long rd_req; diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 9caade7bc9..b459a2f036 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2463,7 +2463,7 @@ qemuMonitorJSONGetOneBlockStatsNodeInfo(virJSONValue *dev, } -virJSONValue * +static virJSONValue * qemuMonitorJSONQueryBlockstats(qemuMonitor *mon, bool queryNodes) { diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index f17769f7fe..5944aec917 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -91,9 +91,6 @@ int qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, GHashTable *table); -virJSONValue * -qemuMonitorJSONQueryBlockstats(qemuMonitor *mon, - bool queryNodes); int qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, GHashTable *hash); -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> Convert the rest of the code to the new prevailing coding style. Commit 6e6a11bc0ac did the same for the header file. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_monitor_json.c | 373 +++++++++++++++++++++++------------ 1 file changed, 246 insertions(+), 127 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index b459a2f036..2dbaa7a798 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -133,6 +133,7 @@ static qemuEventHandler eventHandlers[] = { /* We use bsearch, so keep this list sorted. */ }; + static int qemuMonitorEventCompare(const void *key, const void *elt) { @@ -141,6 +142,7 @@ qemuMonitorEventCompare(const void *key, const void *elt) return strcmp(type, handler->type); } + static int qemuMonitorJSONIOProcessEvent(qemuMonitor *mon, virJSONValue *obj) @@ -183,6 +185,7 @@ qemuMonitorJSONIOProcessEvent(qemuMonitor *mon, return 0; } + int qemuMonitorJSONIOProcessLine(qemuMonitor *mon, const char *line, @@ -227,10 +230,12 @@ qemuMonitorJSONIOProcessLine(qemuMonitor *mon, return -1; } -int qemuMonitorJSONIOProcess(qemuMonitor *mon, - const char *data, - size_t len, - qemuMonitorMessage *msg) + +int +qemuMonitorJSONIOProcess(qemuMonitor *mon, + const char *data, + size_t len, + qemuMonitorMessage *msg) { int used = 0; /*VIR_DEBUG("Data %d bytes [%s]", len, data);*/ @@ -254,6 +259,7 @@ int qemuMonitorJSONIOProcess(qemuMonitor *mon, return used; } + static int qemuMonitorJSONCommandWithFd(qemuMonitor *mon, virJSONValue *cmd, @@ -308,6 +314,7 @@ qemuMonitorJSONCommand(qemuMonitor *mon, return qemuMonitorJSONCommandWithFd(mon, cmd, -1, reply); } + /* Ignoring OOM in this method, since we're already reporting * a more important error * @@ -332,6 +339,7 @@ qemuMonitorJSONStringifyError(virJSONValue *error) return detail; } + static const char * qemuMonitorJSONCommandName(virJSONValue *cmd) { @@ -342,6 +350,7 @@ qemuMonitorJSONCommandName(virJSONValue *cmd) return "<unknown>"; } + static int qemuMonitorJSONCheckErrorFull(virJSONValue *cmd, virJSONValue *reply, @@ -545,7 +554,9 @@ qemuMonitorJSONMakeCommand(const char *cmdname, } -static void qemuMonitorJSONHandleShutdown(qemuMonitor *mon, virJSONValue *data) +static void +qemuMonitorJSONHandleShutdown(qemuMonitor *mon, + virJSONValue *data) { bool guest = false; const char *reason = NULL; @@ -560,17 +571,24 @@ static void qemuMonitorJSONHandleShutdown(qemuMonitor *mon, virJSONValue *data) qemuMonitorEmitShutdown(mon, guest_initiated, reason); } -static void qemuMonitorJSONHandleReset(qemuMonitor *mon, virJSONValue *data G_GNUC_UNUSED) + +static void qemuMonitorJSONHandleReset(qemuMonitor *mon, + virJSONValue *data G_GNUC_UNUSED) { qemuMonitorEmitReset(mon); } -static void qemuMonitorJSONHandleStop(qemuMonitor *mon, virJSONValue *data G_GNUC_UNUSED) + +static void +qemuMonitorJSONHandleStop(qemuMonitor *mon, + virJSONValue *data G_GNUC_UNUSED) { qemuMonitorEmitStop(mon); } -static void qemuMonitorJSONHandleResume(qemuMonitor *mon, virJSONValue *data G_GNUC_UNUSED) +static void +qemuMonitorJSONHandleResume(qemuMonitor *mon, + virJSONValue *data G_GNUC_UNUSED) { qemuMonitorEmitResume(mon); } @@ -596,6 +614,7 @@ qemuMonitorJSONGuestPanicExtractInfoHyperv(virJSONValue *data) return g_steal_pointer(&ret); } + static qemuMonitorEventPanicInfo * qemuMonitorJSONGuestPanicExtractInfoS390(virJSONValue *data) { @@ -625,6 +644,7 @@ qemuMonitorJSONGuestPanicExtractInfoS390(virJSONValue *data) return g_steal_pointer(&ret); } + static qemuMonitorEventPanicInfo * qemuMonitorJSONGuestPanicExtractInfoTDX(virJSONValue *data) { @@ -655,6 +675,7 @@ qemuMonitorJSONGuestPanicExtractInfoTDX(virJSONValue *data) return g_steal_pointer(&ret); } + static qemuMonitorEventPanicInfo * qemuMonitorJSONGuestPanicExtractInfo(virJSONValue *data) { @@ -687,7 +708,9 @@ qemuMonitorJSONHandleGuestPanic(qemuMonitor *mon, } -static void qemuMonitorJSONHandleRTCChange(qemuMonitor *mon, virJSONValue *data) +static void +qemuMonitorJSONHandleRTCChange(qemuMonitor *mon, + virJSONValue *data) { long long offset = 0; if (virJSONValueObjectGetNumberLong(data, "offset", &offset) < 0) { @@ -697,13 +720,17 @@ static void qemuMonitorJSONHandleRTCChange(qemuMonitor *mon, virJSONValue *data) qemuMonitorEmitRTCChange(mon, offset); } + VIR_ENUM_DECL(qemuMonitorWatchdogAction); VIR_ENUM_IMPL(qemuMonitorWatchdogAction, VIR_DOMAIN_EVENT_WATCHDOG_LAST, "none", "pause", "reset", "poweroff", "shutdown", "debug", "inject-nmi", ); -static void qemuMonitorJSONHandleWatchdog(qemuMonitor *mon, virJSONValue *data) + +static void +qemuMonitorJSONHandleWatchdog(qemuMonitor *mon, + virJSONValue *data) { const char *action; int actionID; @@ -720,6 +747,7 @@ static void qemuMonitorJSONHandleWatchdog(qemuMonitor *mon, virJSONValue *data) qemuMonitorEmitWatchdog(mon, actionID); } + VIR_ENUM_DECL(qemuMonitorIOErrorAction); VIR_ENUM_IMPL(qemuMonitorIOErrorAction, VIR_DOMAIN_EVENT_IO_ERROR_LAST, @@ -728,7 +756,8 @@ VIR_ENUM_IMPL(qemuMonitorIOErrorAction, static void -qemuMonitorJSONHandleIOError(qemuMonitor *mon, virJSONValue *data) +qemuMonitorJSONHandleIOError(qemuMonitor *mon, + virJSONValue *data) { const char *device; const char *qompath; @@ -778,6 +807,7 @@ VIR_ENUM_IMPL(qemuMonitorGraphicsAddressFamily, "ipv4", "ipv6", "unix", ); + static void qemuMonitorJSONHandleGraphicsVNC(qemuMonitor *mon, virJSONValue *data, @@ -849,19 +879,26 @@ qemuMonitorJSONHandleGraphicsVNC(qemuMonitor *mon, authScheme, x509dname, saslUsername); } -static void qemuMonitorJSONHandleVNCConnect(qemuMonitor *mon, virJSONValue *data) + +static void +qemuMonitorJSONHandleVNCConnect(qemuMonitor *mon, + virJSONValue *data) { qemuMonitorJSONHandleGraphicsVNC(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_CONNECT); } -static void qemuMonitorJSONHandleVNCInitialize(qemuMonitor *mon, virJSONValue *data) +static void +qemuMonitorJSONHandleVNCInitialize(qemuMonitor *mon, + virJSONValue *data) { qemuMonitorJSONHandleGraphicsVNC(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE); } -static void qemuMonitorJSONHandleVNCDisconnect(qemuMonitor *mon, virJSONValue *data) +static void +qemuMonitorJSONHandleVNCDisconnect(qemuMonitor *mon, + virJSONValue *data) { qemuMonitorJSONHandleGraphicsVNC(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT); } @@ -931,23 +968,30 @@ qemuMonitorJSONHandleGraphicsSPICE(qemuMonitor *mon, } -static void qemuMonitorJSONHandleSPICEConnect(qemuMonitor *mon, virJSONValue *data) +static void +qemuMonitorJSONHandleSPICEConnect(qemuMonitor *mon, + virJSONValue *data) { qemuMonitorJSONHandleGraphicsSPICE(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_CONNECT); } -static void qemuMonitorJSONHandleSPICEInitialize(qemuMonitor *mon, virJSONValue *data) +static void +qemuMonitorJSONHandleSPICEInitialize(qemuMonitor *mon, + virJSONValue *data) { qemuMonitorJSONHandleGraphicsSPICE(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE); } -static void qemuMonitorJSONHandleSPICEDisconnect(qemuMonitor *mon, virJSONValue *data) +static void +qemuMonitorJSONHandleSPICEDisconnect(qemuMonitor *mon, + virJSONValue *data) { qemuMonitorJSONHandleGraphicsSPICE(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT); } + static void qemuMonitorJSONHandleJobStatusChange(qemuMonitor *mon, virJSONValue *data) @@ -1002,6 +1046,7 @@ qemuMonitorJSONHandleTrayChange(qemuMonitor *mon, qemuMonitorEmitTrayChange(mon, devAlias, devid, reason); } + static void qemuMonitorJSONHandlePMWakeup(qemuMonitor *mon, virJSONValue *data G_GNUC_UNUSED) @@ -1009,6 +1054,7 @@ qemuMonitorJSONHandlePMWakeup(qemuMonitor *mon, qemuMonitorEmitPMWakeup(mon); } + static void qemuMonitorJSONHandlePMSuspend(qemuMonitor *mon, virJSONValue *data G_GNUC_UNUSED) @@ -1030,6 +1076,7 @@ qemuMonitorJSONHandleBalloonChange(qemuMonitor *mon, qemuMonitorEmitBalloonChange(mon, actual); } + static void qemuMonitorJSONHandlePMSuspendDisk(qemuMonitor *mon, virJSONValue *data G_GNUC_UNUSED) @@ -1037,8 +1084,10 @@ qemuMonitorJSONHandlePMSuspendDisk(qemuMonitor *mon, qemuMonitorEmitPMSuspendDisk(mon); } + static void -qemuMonitorJSONHandleDeviceDeleted(qemuMonitor *mon, virJSONValue *data) +qemuMonitorJSONHandleDeviceDeleted(qemuMonitor *mon, + virJSONValue *data) { const char *device; @@ -1052,7 +1101,8 @@ qemuMonitorJSONHandleDeviceDeleted(qemuMonitor *mon, virJSONValue *data) static void -qemuMonitorJSONHandleDeviceUnplugErr(qemuMonitor *mon, virJSONValue *data) +qemuMonitorJSONHandleDeviceUnplugErr(qemuMonitor *mon, + virJSONValue *data) { const char *device; const char *path; @@ -1069,7 +1119,8 @@ qemuMonitorJSONHandleDeviceUnplugErr(qemuMonitor *mon, virJSONValue *data) static void -qemuMonitorJSONHandleNetdevStreamDisconnected(qemuMonitor *mon, virJSONValue *data) +qemuMonitorJSONHandleNetdevStreamDisconnected(qemuMonitor *mon, + virJSONValue *data) { const char *name; @@ -1083,7 +1134,8 @@ qemuMonitorJSONHandleNetdevStreamDisconnected(qemuMonitor *mon, virJSONValue *da static void -qemuMonitorJSONHandleNetdevVhostUserDisconnected(qemuMonitor *mon, virJSONValue *data) +qemuMonitorJSONHandleNetdevVhostUserDisconnected(qemuMonitor *mon, + virJSONValue *data) { const char *name; @@ -1097,7 +1149,8 @@ qemuMonitorJSONHandleNetdevVhostUserDisconnected(qemuMonitor *mon, virJSONValue static void -qemuMonitorJSONHandleNicRxFilterChanged(qemuMonitor *mon, virJSONValue *data) +qemuMonitorJSONHandleNicRxFilterChanged(qemuMonitor *mon, + virJSONValue *data) { const char *name; @@ -1245,7 +1298,8 @@ qemuMonitorJSONHandleMigrationPass(qemuMonitor *mon, static void -qemuMonitorJSONHandleAcpiOstInfo(qemuMonitor *mon, virJSONValue *data) +qemuMonitorJSONHandleAcpiOstInfo(qemuMonitor *mon, + virJSONValue *data) { virJSONValue *info; const char *alias; @@ -1282,7 +1336,8 @@ qemuMonitorJSONHandleAcpiOstInfo(qemuMonitor *mon, virJSONValue *data) static void -qemuMonitorJSONHandleBlockThreshold(qemuMonitor *mon, virJSONValue *data) +qemuMonitorJSONHandleBlockThreshold(qemuMonitor *mon, + virJSONValue *data) { const char *nodename; unsigned long long threshold; @@ -1363,8 +1418,9 @@ qemuMonitorJSONHandleDumpCompleted(qemuMonitor *mon, } -static void qemuMonitorJSONHandlePRManagerStatusChanged(qemuMonitor *mon, - virJSONValue *data) +static void +qemuMonitorJSONHandlePRManagerStatusChanged(qemuMonitor *mon, + virJSONValue *data) { const char *name; bool connected; @@ -1384,8 +1440,9 @@ static void qemuMonitorJSONHandlePRManagerStatusChanged(qemuMonitor *mon, } -static void qemuMonitorJSONHandleRdmaGidStatusChanged(qemuMonitor *mon, - virJSONValue *data) +static void +qemuMonitorJSONHandleRdmaGidStatusChanged(qemuMonitor *mon, + virJSONValue *data) { const char *netdev; bool gid_status; @@ -1576,7 +1633,8 @@ qemuMonitorJSONGetStatus(qemuMonitor *mon, } -int qemuMonitorJSONSystemPowerdown(qemuMonitor *mon) +int +qemuMonitorJSONSystemPowerdown(qemuMonitor *mon) { g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("system_powerdown", NULL); g_autoptr(virJSONValue) reply = NULL; @@ -1593,9 +1651,11 @@ int qemuMonitorJSONSystemPowerdown(qemuMonitor *mon) return 0; } -int qemuMonitorJSONSetLink(qemuMonitor *mon, - const char *name, - virDomainNetInterfaceLinkState state) + +int +qemuMonitorJSONSetLink(qemuMonitor *mon, + const char *name, + virDomainNetInterfaceLinkState state) { g_autoptr(virJSONValue) reply = NULL; g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("set_link", @@ -1615,7 +1675,9 @@ int qemuMonitorJSONSetLink(qemuMonitor *mon, return 0; } -int qemuMonitorJSONSystemReset(qemuMonitor *mon) + +int +qemuMonitorJSONSystemReset(qemuMonitor *mon) { g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("system_reset", NULL); g_autoptr(virJSONValue) reply = NULL; @@ -2250,8 +2312,9 @@ qemuMonitorJSONBlockInfoAdd(GHashTable *table, } -int qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, - GHashTable *table) +int +qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, + GHashTable *table) { size_t i; g_autoptr(virJSONValue) devices = NULL; @@ -2823,10 +2886,11 @@ qemuMonitorJSONBlockGetNamedNodeData(qemuMonitor *mon) } -int qemuMonitorJSONBlockResize(qemuMonitor *mon, - const char *device, - const char *nodename, - unsigned long long size) +int +qemuMonitorJSONBlockResize(qemuMonitor *mon, + const char *device, + const char *nodename, + unsigned long long size) { g_autoptr(virJSONValue) cmd = NULL; g_autoptr(virJSONValue) reply = NULL; @@ -2849,10 +2913,11 @@ int qemuMonitorJSONBlockResize(qemuMonitor *mon, } -int qemuMonitorJSONSetPassword(qemuMonitor *mon, - const char *protocol, - const char *password, - const char *action_if_connected) +int +qemuMonitorJSONSetPassword(qemuMonitor *mon, + const char *protocol, + const char *password, + const char *action_if_connected) { g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("set_password", "s:protocol", protocol, @@ -2873,9 +2938,11 @@ int qemuMonitorJSONSetPassword(qemuMonitor *mon, return 0; } -int qemuMonitorJSONExpirePassword(qemuMonitor *mon, - const char *protocol, - const char *expire_time) + +int +qemuMonitorJSONExpirePassword(qemuMonitor *mon, + const char *protocol, + const char *expire_time) { g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("expire_password", "s:protocol", protocol, @@ -2926,11 +2993,12 @@ qemuMonitorJSONSetBalloon(qemuMonitor *mon, } -static int qemuMonitorJSONSaveMemory(qemuMonitor *mon, - const char *cmdtype, - unsigned long long offset, - unsigned long long length, - const char *path) +static int +qemuMonitorJSONSaveMemory(qemuMonitor *mon, + const char *cmdtype, + unsigned long long offset, + unsigned long long length, + const char *path) { g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand(cmdtype, "U:val", offset, @@ -2994,6 +3062,7 @@ qemuMonitorJSONGetMigrationParams(qemuMonitor *mon, return 0; } + int qemuMonitorJSONSetMigrationParams(qemuMonitor *mon, virJSONValue **params) @@ -3225,9 +3294,10 @@ qemuMonitorJSONGetMigrationStatsReply(virJSONValue *reply, } -int qemuMonitorJSONGetMigrationStats(qemuMonitor *mon, - qemuMonitorMigrationStats *stats, - char **error) +int +qemuMonitorJSONGetMigrationStats(qemuMonitor *mon, + qemuMonitorMigrationStats *stats, + char **error) { g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("query-migrate", NULL); @@ -3251,9 +3321,10 @@ int qemuMonitorJSONGetMigrationStats(qemuMonitor *mon, } -int qemuMonitorJSONMigrate(qemuMonitor *mon, - unsigned int flags, - const char *uri) +int +qemuMonitorJSONMigrate(qemuMonitor *mon, + unsigned int flags, + const char *uri) { bool resume = !!(flags & QEMU_MONITOR_MIGRATE_RESUME); g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("migrate", @@ -3318,7 +3389,8 @@ qemuMonitorJSONGetMigrationBlockers(qemuMonitor *mon, } -int qemuMonitorJSONMigrateCancel(qemuMonitor *mon) +int +qemuMonitorJSONMigrateCancel(qemuMonitor *mon) { g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("migrate_cancel", NULL); g_autoptr(virJSONValue) reply = NULL; @@ -3426,6 +3498,7 @@ qemuMonitorJSONGetDumpGuestMemoryCapability(qemuMonitor *mon, return 0; } + int qemuMonitorJSONDump(qemuMonitor *mon, const char *protocol, @@ -3452,12 +3525,14 @@ qemuMonitorJSONDump(qemuMonitor *mon, return 0; } -int qemuMonitorJSONGraphicsRelocate(qemuMonitor *mon, - int type, - const char *hostname, - int port, - int tlsPort, - const char *tlsSubject) + +int +qemuMonitorJSONGraphicsRelocate(qemuMonitor *mon, + int type, + const char *hostname, + int port, + int tlsPort, + const char *tlsSubject) { const char *protocol = "vnc"; g_autoptr(virJSONValue) cmd = NULL; @@ -3577,8 +3652,9 @@ qemuMonitorJSONQueryFdsetsParse(virJSONValue *msg, } -int qemuMonitorJSONQueryFdsets(qemuMonitor *mon, - qemuMonitorFdsets **fdsets) +int +qemuMonitorJSONQueryFdsets(qemuMonitor *mon, + qemuMonitorFdsets **fdsets) { g_autoptr(virJSONValue) reply = NULL; g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("query-fdsets", @@ -3600,8 +3676,9 @@ int qemuMonitorJSONQueryFdsets(qemuMonitor *mon, } -int qemuMonitorJSONRemoveFdset(qemuMonitor *mon, - unsigned int fdset) +int +qemuMonitorJSONRemoveFdset(qemuMonitor *mon, + unsigned int fdset) { g_autoptr(virJSONValue) reply = NULL; g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("remove-fd", @@ -3621,9 +3698,10 @@ int qemuMonitorJSONRemoveFdset(qemuMonitor *mon, } -int qemuMonitorJSONSendFileHandle(qemuMonitor *mon, - const char *fdname, - int fd) +int +qemuMonitorJSONSendFileHandle(qemuMonitor *mon, + const char *fdname, + int fd) { g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("getfd", "s:fdname", fdname, @@ -3643,8 +3721,9 @@ int qemuMonitorJSONSendFileHandle(qemuMonitor *mon, } -int qemuMonitorJSONCloseFileHandle(qemuMonitor *mon, - const char *fdname) +int +qemuMonitorJSONCloseFileHandle(qemuMonitor *mon, + const char *fdname) { g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("closefd", "s:fdname", fdname, @@ -3860,7 +3939,8 @@ qemuMonitorJSONQueryRxFilterParse(virJSONValue *msg, int -qemuMonitorJSONQueryRxFilter(qemuMonitor *mon, const char *alias, +qemuMonitorJSONQueryRxFilter(qemuMonitor *mon, + const char *alias, virNetDevRxFilter **filter) { g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("query-rx-filter", @@ -3985,8 +4065,9 @@ qemuMonitorJSONGetChardevInfo(qemuMonitor *mon, } -int qemuMonitorJSONDelDevice(qemuMonitor *mon, - const char *devalias) +int +qemuMonitorJSONDelDevice(qemuMonitor *mon, + const char *devalias) { g_autoptr(virJSONValue) cmd = NULL; g_autoptr(virJSONValue) reply = NULL; @@ -4126,7 +4207,8 @@ qemuMonitorJSONBlockdevMirror(qemuMonitor *mon, int -qemuMonitorJSONTransaction(qemuMonitor *mon, virJSONValue **actions) +qemuMonitorJSONTransaction(qemuMonitor *mon, + virJSONValue **actions) { g_autoptr(virJSONValue) cmd = NULL; g_autoptr(virJSONValue) reply = NULL; @@ -4190,10 +4272,12 @@ qemuMonitorJSONBlockCommit(qemuMonitor *mon, return 0; } -int qemuMonitorJSONArbitraryCommand(qemuMonitor *mon, - const char *cmd_str, - int fd, - char **reply_str) + +int +qemuMonitorJSONArbitraryCommand(qemuMonitor *mon, + const char *cmd_str, + int fd, + char **reply_str) { g_autoptr(virJSONValue) cmd = NULL; g_autoptr(virJSONValue) reply = NULL; @@ -4210,7 +4294,9 @@ int qemuMonitorJSONArbitraryCommand(qemuMonitor *mon, return 0; } -int qemuMonitorJSONInjectNMI(qemuMonitor *mon) + +int +qemuMonitorJSONInjectNMI(qemuMonitor *mon) { g_autoptr(virJSONValue) cmd = NULL; g_autoptr(virJSONValue) reply = NULL; @@ -4228,10 +4314,12 @@ int qemuMonitorJSONInjectNMI(qemuMonitor *mon) return 0; } -int qemuMonitorJSONSendKey(qemuMonitor *mon, - unsigned int holdtime, - unsigned int *keycodes, - unsigned int nkeycodes) + +int +qemuMonitorJSONSendKey(qemuMonitor *mon, + unsigned int holdtime, + unsigned int *keycodes, + unsigned int nkeycodes) { g_autoptr(virJSONValue) cmd = NULL; g_autoptr(virJSONValue) reply = NULL; @@ -4281,11 +4369,13 @@ int qemuMonitorJSONSendKey(qemuMonitor *mon, return 0; } -int qemuMonitorJSONScreendump(qemuMonitor *mon, - const char *device, - unsigned int head, - const char *format, - const char *file) + +int +qemuMonitorJSONScreendump(qemuMonitor *mon, + const char *device, + unsigned int head, + const char *format, + const char *file) { g_autoptr(virJSONValue) cmd = NULL; g_autoptr(virJSONValue) reply = NULL; @@ -4375,6 +4465,7 @@ qemuMonitorJSONParseBlockJobInfo(GHashTable *blockJobs, return 0; } + GHashTable * qemuMonitorJSONGetAllBlockJobInfo(qemuMonitor *mon, bool rawjobname) @@ -4587,10 +4678,11 @@ qemuMonitorJSONJobComplete(qemuMonitor *mon, } -int qemuMonitorJSONOpenGraphics(qemuMonitor *mon, - const char *protocol, - const char *fdname, - bool skipauth) +int +qemuMonitorJSONOpenGraphics(qemuMonitor *mon, + const char *protocol, + const char *fdname, + bool skipauth) { g_autoptr(virJSONValue) cmd = NULL; g_autoptr(virJSONValue) reply = NULL; @@ -4706,9 +4798,11 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValue *io_throttle, #undef GET_THROTTLE_STATS #undef GET_THROTTLE_STATS_OPTIONAL -int qemuMonitorJSONSetBlockIoThrottle(qemuMonitor *mon, - const char *qomid, - virDomainBlockIoTuneInfo *info) + +int +qemuMonitorJSONSetBlockIoThrottle(qemuMonitor *mon, + const char *qomid, + virDomainBlockIoTuneInfo *info) { g_autoptr(virJSONValue) cmd = NULL; g_autoptr(virJSONValue) result = NULL; @@ -4747,9 +4841,11 @@ int qemuMonitorJSONSetBlockIoThrottle(qemuMonitor *mon, return 0; } -int qemuMonitorJSONGetBlockIoThrottle(qemuMonitor *mon, - const char *qdevid, - virDomainBlockIoTuneInfo *reply) + +int +qemuMonitorJSONGetBlockIoThrottle(qemuMonitor *mon, + const char *qdevid, + virDomainBlockIoTuneInfo *reply) { g_autoptr(virJSONValue) devices = NULL; @@ -4820,7 +4916,8 @@ qemuMonitorJSONUpdateThrottleGroup(qemuMonitor *mon, } -int qemuMonitorJSONSystemWakeup(qemuMonitor *mon) +int +qemuMonitorJSONSystemWakeup(qemuMonitor *mon) { g_autoptr(virJSONValue) cmd = NULL; g_autoptr(virJSONValue) reply = NULL; @@ -4838,11 +4935,13 @@ int qemuMonitorJSONSystemWakeup(qemuMonitor *mon) return 0; } -int qemuMonitorJSONGetVersion(qemuMonitor *mon, - int *major, - int *minor, - int *micro, - char **package) + +int +qemuMonitorJSONGetVersion(qemuMonitor *mon, + int *major, + int *minor, + int *micro, + char **package) { g_autoptr(virJSONValue) cmd = NULL; g_autoptr(virJSONValue) reply = NULL; @@ -4898,8 +4997,9 @@ int qemuMonitorJSONGetVersion(qemuMonitor *mon, } -int qemuMonitorJSONGetMachines(qemuMonitor *mon, - qemuMonitorMachineInfo ***machines) +int +qemuMonitorJSONGetMachines(qemuMonitor *mon, + qemuMonitorMachineInfo ***machines) { int ret = -1; g_autoptr(virJSONValue) cmd = NULL; @@ -5523,9 +5623,10 @@ qemuMonitorJSONGetCommandLineOptions(qemuMonitor *mon) } -int qemuMonitorJSONGetKVMState(qemuMonitor *mon, - bool *enabled, - bool *present) +int +qemuMonitorJSONGetKVMState(qemuMonitor *mon, + bool *enabled, + bool *present) { g_autoptr(virJSONValue) cmd = NULL; g_autoptr(virJSONValue) reply = NULL; @@ -5599,9 +5700,10 @@ qemuMonitorJSONGetObjectTypes(qemuMonitor *mon, } -int qemuMonitorJSONGetObjectListPaths(qemuMonitor *mon, - const char *path, - qemuMonitorJSONListPath ***paths) +int +qemuMonitorJSONGetObjectListPaths(qemuMonitor *mon, + const char *path, + qemuMonitorJSONListPath ***paths) { int ret = -1; g_autoptr(virJSONValue) cmd = NULL; @@ -5668,7 +5770,9 @@ int qemuMonitorJSONGetObjectListPaths(qemuMonitor *mon, return ret; } -void qemuMonitorJSONListPathFree(qemuMonitorJSONListPath *paths) + +void +qemuMonitorJSONListPathFree(qemuMonitorJSONListPath *paths) { if (!paths) return; @@ -5678,10 +5782,11 @@ void qemuMonitorJSONListPathFree(qemuMonitorJSONListPath *paths) } -int qemuMonitorJSONGetObjectProperty(qemuMonitor *mon, - const char *path, - const char *property, - qemuMonitorJSONObjectProperty *prop) +int +qemuMonitorJSONGetObjectProperty(qemuMonitor *mon, + const char *path, + const char *property, + qemuMonitorJSONObjectProperty *prop) { int ret = -1; g_autoptr(virJSONValue) cmd = NULL; @@ -5786,10 +5891,11 @@ qemuMonitorJSONGetStringListProperty(qemuMonitor *mon, "s:property", property, \ STRING, VALUE, \ NULL) -int qemuMonitorJSONSetObjectProperty(qemuMonitor *mon, - const char *path, - const char *property, - qemuMonitorJSONObjectProperty *prop) +int +qemuMonitorJSONSetObjectProperty(qemuMonitor *mon, + const char *path, + const char *property, + qemuMonitorJSONObjectProperty *prop) { g_autoptr(virJSONValue) cmd = NULL; g_autoptr(virJSONValue) reply = NULL; @@ -6394,6 +6500,7 @@ qemuMonitorJSONBuildInetSocketAddress(const char *host, return g_steal_pointer(&addr); } + static virJSONValue * qemuMonitorJSONBuildUnixSocketAddress(const char *path) { @@ -6475,6 +6582,7 @@ qemuMonitorJSONNBDServerStart(qemuMonitor *mon, return 0; } + int qemuMonitorJSONNBDServerStop(qemuMonitor *mon) { @@ -6604,6 +6712,7 @@ struct _qemuMonitorJSONCPUPropsFilterData { virJSONValue *unavailableFeatures; }; + static int qemuMonitorJSONCPUPropsFilter(const char *name, virJSONValue *propData, @@ -6827,6 +6936,7 @@ qemuMonitorJSONRTCResetReinjection(qemuMonitor *mon) return 0; } + /** * Query and parse returned array of data such as: * @@ -8158,6 +8268,7 @@ qemuMonitorJSONTransactionSnapshotBlockdev(virJSONValue *actions, NULL); } + VIR_ENUM_DECL(qemuMonitorTransactionBackupSyncMode); VIR_ENUM_IMPL(qemuMonitorTransactionBackupSyncMode, QEMU_MONITOR_TRANSACTION_BACKUP_SYNC_MODE_LAST, @@ -8165,6 +8276,7 @@ VIR_ENUM_IMPL(qemuMonitorTransactionBackupSyncMode, "incremental", "full"); + int qemuMonitorJSONTransactionBackup(virJSONValue *actions, const char *device, @@ -8311,6 +8423,7 @@ qemuMonitorJSONStartDirtyRateCalc(qemuMonitor *mon, return 0; } + VIR_ENUM_DECL(qemuMonitorDirtyRateStatus); VIR_ENUM_IMPL(qemuMonitorDirtyRateStatus, VIR_DOMAIN_DIRTYRATE_LAST, @@ -8318,6 +8431,7 @@ VIR_ENUM_IMPL(qemuMonitorDirtyRateStatus, "measuring", "measured"); + static int qemuMonitorJSONExtractVcpuDirtyRate(virJSONValue *data, qemuMonitorDirtyRateInfo *info) @@ -8349,6 +8463,7 @@ qemuMonitorJSONExtractVcpuDirtyRate(virJSONValue *data, return 0; } + static int qemuMonitorJSONExtractDirtyRateInfo(virJSONValue *data, qemuMonitorDirtyRateInfo *info) @@ -8556,6 +8671,7 @@ qemuMonitorJSONMigrateRecover(qemuMonitor *mon, return qemuMonitorJSONCheckError(cmd, reply); } + static GHashTable * qemuMonitorJSONExtractQueryStatsSchema(virJSONValue *json) { @@ -8628,6 +8744,7 @@ qemuMonitorJSONExtractQueryStatsSchema(virJSONValue *json) return g_steal_pointer(&schema); } + GHashTable * qemuMonitorJSONQueryStatsSchema(qemuMonitor *mon, qemuMonitorQueryStatsProviderType provider_type) @@ -8734,9 +8851,11 @@ qemuMonitorJSONQueryStats(qemuMonitor *mon, return virJSONValueObjectStealArray(reply, "return"); } -int qemuMonitorJSONDisplayReload(qemuMonitor *mon, - const char *type, - bool tlsCerts) + +int +qemuMonitorJSONDisplayReload(qemuMonitor *mon, + const char *type, + bool tlsCerts) { g_autoptr(virJSONValue) reply = NULL; g_autoptr(virJSONValue) cmd = NULL; -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> Convert the rest of the header file to the new prevailing coding style. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_monitor.h | 1139 ++++++++++++++++++++++++--------------- 1 file changed, 691 insertions(+), 448 deletions(-) diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 6427fd42cd..82354a83d9 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -182,11 +182,17 @@ struct _qemuMonitorJobInfo { }; -char *qemuMonitorGuestPanicEventInfoFormatMsg(qemuMonitorEventPanicInfo *info); -void qemuMonitorEventPanicInfoFree(qemuMonitorEventPanicInfo *info); +char * +qemuMonitorGuestPanicEventInfoFormatMsg(qemuMonitorEventPanicInfo *info); +void +qemuMonitorEventPanicInfoFree(qemuMonitorEventPanicInfo *info); G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMonitorEventPanicInfo, qemuMonitorEventPanicInfoFree); -void qemuMonitorEventRdmaGidStatusFree(qemuMonitorRdmaGidStatus *info); -void qemuMonitorMemoryDeviceSizeChangeFree(qemuMonitorMemoryDeviceSizeChange *info); + +void +qemuMonitorEventRdmaGidStatusFree(qemuMonitorRdmaGidStatus *info); + +void +qemuMonitorMemoryDeviceSizeChangeFree(qemuMonitorMemoryDeviceSizeChange *info); typedef void (*qemuMonitorDestroyCallback)(qemuMonitor *mon, virDomainObj *vm); @@ -420,143 +426,227 @@ struct _qemuMonitorCallbacks { qemuMonitorDomainNetdevVhostUserDisconnectedCallback domainNetdevVhostUserDisconnected; }; -qemuMonitor *qemuMonitorOpen(virDomainObj *vm, - virDomainChrSourceDef *config, - GMainContext *context, - qemuMonitorCallbacks *cb) +qemuMonitor * +qemuMonitorOpen(virDomainObj *vm, + virDomainChrSourceDef *config, + GMainContext *context, + qemuMonitorCallbacks *cb) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4); -void qemuMonitorWatchDispose(void); -bool qemuMonitorWasDisposed(void); +void +qemuMonitorWatchDispose(void); + +bool +qemuMonitorWasDisposed(void); -void qemuMonitorRegister(qemuMonitor *mon) +void +qemuMonitorRegister(qemuMonitor *mon) ATTRIBUTE_NONNULL(1); -void qemuMonitorUnregister(qemuMonitor *mon) + +void +qemuMonitorUnregister(qemuMonitor *mon) ATTRIBUTE_NONNULL(1); -void qemuMonitorClose(qemuMonitor *mon); -virErrorPtr qemuMonitorLastError(qemuMonitor *mon); +void +qemuMonitorClose(qemuMonitor *mon); + +virErrorPtr +qemuMonitorLastError(qemuMonitor *mon); -int qemuMonitorSetCapabilities(qemuMonitor *mon); +int +qemuMonitorSetCapabilities(qemuMonitor *mon); -int qemuMonitorSetLink(qemuMonitor *mon, - const char *name, - virDomainNetInterfaceLinkState state) +int +qemuMonitorSetLink(qemuMonitor *mon, + const char *name, + virDomainNetInterfaceLinkState state) ATTRIBUTE_NONNULL(2); /* These APIs are for use by the internal Text/JSON monitor impl code only */ -char *qemuMonitorNextCommandID(qemuMonitor *mon); -int qemuMonitorSend(qemuMonitor *mon, - qemuMonitorMessage *msg) ATTRIBUTE_MOCKABLE; -int qemuMonitorUpdateVideoMemorySize(qemuMonitor *mon, - virDomainVideoDef *video, - const char *videoName) +char * +qemuMonitorNextCommandID(qemuMonitor *mon); + +int +qemuMonitorSend(qemuMonitor *mon, + qemuMonitorMessage *msg) ATTRIBUTE_MOCKABLE; + +int +qemuMonitorUpdateVideoMemorySize(qemuMonitor *mon, + virDomainVideoDef *video, + const char *videoName) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); -int qemuMonitorUpdateVideoVram64Size(qemuMonitor *mon, - virDomainVideoDef *video, - const char *videoName) + +int +qemuMonitorUpdateVideoVram64Size(qemuMonitor *mon, + virDomainVideoDef *video, + const char *videoName) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); -void qemuMonitorEmitEvent(qemuMonitor *mon, const char *event, - long long seconds, unsigned int micros, - const char *details); -void qemuMonitorEmitShutdown(qemuMonitor *mon, virTristateBool guest, const char *reason); -void qemuMonitorEmitReset(qemuMonitor *mon); -void qemuMonitorEmitStop(qemuMonitor *mon); -void qemuMonitorEmitResume(qemuMonitor *mon); -void qemuMonitorEmitRTCChange(qemuMonitor *mon, long long offset); -void qemuMonitorEmitWatchdog(qemuMonitor *mon, int action); -void qemuMonitorEmitIOError(qemuMonitor *mon, - const char *device, - const char *qompath, - const char *nodename, - int action, - bool nospace, - const char *reason); -void qemuMonitorEmitGraphics(qemuMonitor *mon, - int phase, - int localFamily, - const char *localNode, - const char *localService, - int remoteFamily, - const char *remoteNode, - const char *remoteService, - const char *authScheme, - const char *x509dname, - const char *saslUsername); -void qemuMonitorEmitTrayChange(qemuMonitor *mon, - const char *devAlias, - const char *devid, - int reason); -void qemuMonitorEmitPMWakeup(qemuMonitor *mon); -void qemuMonitorEmitPMSuspend(qemuMonitor *mon); -void qemuMonitorEmitJobStatusChange(qemuMonitor *mon, - const char *jobname, - qemuMonitorJobStatus status); -void qemuMonitorEmitBalloonChange(qemuMonitor *mon, - unsigned long long actual); -void qemuMonitorEmitPMSuspendDisk(qemuMonitor *mon); -void qemuMonitorEmitGuestPanic(qemuMonitor *mon, - qemuMonitorEventPanicInfo *info); -void qemuMonitorEmitDeviceDeleted(qemuMonitor *mon, +void +qemuMonitorEmitEvent(qemuMonitor *mon, + const char *event, + long long seconds, + unsigned int micros, + const char *details); + +void +qemuMonitorEmitShutdown(qemuMonitor *mon, + virTristateBool guest, + const char *reason); + +void +qemuMonitorEmitReset(qemuMonitor *mon); + +void +qemuMonitorEmitStop(qemuMonitor *mon); + +void +qemuMonitorEmitResume(qemuMonitor *mon); + +void +qemuMonitorEmitRTCChange(qemuMonitor *mon, + long long offset); + +void +qemuMonitorEmitWatchdog(qemuMonitor *mon, + int action); + +void +qemuMonitorEmitIOError(qemuMonitor *mon, + const char *device, + const char *qompath, + const char *nodename, + int action, + bool nospace, + const char *reason); + +void +qemuMonitorEmitGraphics(qemuMonitor *mon, + int phase, + int localFamily, + const char *localNode, + const char *localService, + int remoteFamily, + const char *remoteNode, + const char *remoteService, + const char *authScheme, + const char *x509dname, + const char *saslUsername); + +void +qemuMonitorEmitTrayChange(qemuMonitor *mon, + const char *devAlias, + const char *devid, + int reason); + +void +qemuMonitorEmitPMWakeup(qemuMonitor *mon); + +void +qemuMonitorEmitPMSuspend(qemuMonitor *mon); + +void +qemuMonitorEmitJobStatusChange(qemuMonitor *mon, + const char *jobname, + qemuMonitorJobStatus status); + +void +qemuMonitorEmitBalloonChange(qemuMonitor *mon, + unsigned long long actual); + +void +qemuMonitorEmitPMSuspendDisk(qemuMonitor *mon); + +void +qemuMonitorEmitGuestPanic(qemuMonitor *mon, + qemuMonitorEventPanicInfo *info); + +void +qemuMonitorEmitDeviceDeleted(qemuMonitor *mon, + const char *devAlias); + +void +qemuMonitorEmitDeviceUnplugErr(qemuMonitor *mon, + const char *devPath, + const char *devAlias); + +void +qemuMonitorEmitNetdevStreamDisconnected(qemuMonitor *mon, + const char *devAlias); + +void +qemuMonitorEmitNetdevVhostUserDisconnected(qemuMonitor *mon, + const char *devAlias); + +void +qemuMonitorEmitNicRxFilterChanged(qemuMonitor *mon, const char *devAlias); -void qemuMonitorEmitDeviceUnplugErr(qemuMonitor *mon, - const char *devPath, - const char *devAlias); -void qemuMonitorEmitNetdevStreamDisconnected(qemuMonitor *mon, - const char *devAlias); -void qemuMonitorEmitNetdevVhostUserDisconnected(qemuMonitor *mon, - const char *devAlias); -void qemuMonitorEmitNicRxFilterChanged(qemuMonitor *mon, - const char *devAlias); -void qemuMonitorEmitSerialChange(qemuMonitor *mon, - const char *devAlias, - bool connected); -void qemuMonitorEmitSpiceMigrated(qemuMonitor *mon); - -void qemuMonitorEmitMemoryDeviceSizeChange(qemuMonitor *mon, - const char *devAlias, - unsigned long long size); - -void qemuMonitorEmitMemoryFailure(qemuMonitor *mon, - qemuMonitorEventMemoryFailure *mfp); - -void qemuMonitorEmitMigrationStatus(qemuMonitor *mon, - int status); -void qemuMonitorEmitMigrationPass(qemuMonitor *mon, - int pass); - -void qemuMonitorEmitAcpiOstInfo(qemuMonitor *mon, - const char *alias, - const char *slotType, - const char *slot, - unsigned int source, - unsigned int status); - -void qemuMonitorEmitBlockThreshold(qemuMonitor *mon, - const char *nodename, - unsigned long long threshold, - unsigned long long excess); - -void qemuMonitorEmitDumpCompleted(qemuMonitor *mon, - int status, - qemuMonitorDumpStats *stats, - const char *error); - -void qemuMonitorEmitPRManagerStatusChanged(qemuMonitor *mon, - const char *prManager, - bool connected); - -void qemuMonitorEmitRdmaGidStatusChanged(qemuMonitor *mon, - const char *netdev, - bool gid_status, - unsigned long long subnet_prefix, - unsigned long long interface_id); - -void qemuMonitorEmitGuestCrashloaded(qemuMonitor *mon); - -int qemuMonitorStartCPUs(qemuMonitor *mon); -int qemuMonitorStopCPUs(qemuMonitor *mon); + +void +qemuMonitorEmitSerialChange(qemuMonitor *mon, + const char *devAlias, + bool connected); + +void +qemuMonitorEmitSpiceMigrated(qemuMonitor *mon); + +void +qemuMonitorEmitMemoryDeviceSizeChange(qemuMonitor *mon, + const char *devAlias, + unsigned long long size); + +void +qemuMonitorEmitMemoryFailure(qemuMonitor *mon, + qemuMonitorEventMemoryFailure *mfp); + +void +qemuMonitorEmitMigrationStatus(qemuMonitor *mon, + int status); + +void +qemuMonitorEmitMigrationPass(qemuMonitor *mon, + int pass); + +void +qemuMonitorEmitAcpiOstInfo(qemuMonitor *mon, + const char *alias, + const char *slotType, + const char *slot, + unsigned int source, + unsigned int status); + +void +qemuMonitorEmitBlockThreshold(qemuMonitor *mon, + const char *nodename, + unsigned long long threshold, + unsigned long long excess); + +void +qemuMonitorEmitDumpCompleted(qemuMonitor *mon, + int status, + qemuMonitorDumpStats *stats, + const char *error); + +void +qemuMonitorEmitPRManagerStatusChanged(qemuMonitor *mon, + const char *prManager, + bool connected); + +void +qemuMonitorEmitRdmaGidStatusChanged(qemuMonitor *mon, + const char *netdev, + bool gid_status, + unsigned long long subnet_prefix, + unsigned long long interface_id); + +void +qemuMonitorEmitGuestCrashloaded(qemuMonitor *mon); + +int +qemuMonitorStartCPUs(qemuMonitor *mon); + +int +qemuMonitorStopCPUs(qemuMonitor *mon); typedef enum { QEMU_MONITOR_VM_STATUS_DEBUG, @@ -577,15 +667,21 @@ typedef enum { QEMU_MONITOR_VM_STATUS_LAST } qemuMonitorVMStatus; VIR_ENUM_DECL(qemuMonitorVMStatus); -int qemuMonitorVMStatusToPausedReason(const char *status); -int qemuMonitorGetStatus(qemuMonitor *mon, - bool *running, - virDomainPausedReason *reason) +int +qemuMonitorVMStatusToPausedReason(const char *status); + +int +qemuMonitorGetStatus(qemuMonitor *mon, + bool *running, + virDomainPausedReason *reason) ATTRIBUTE_NONNULL(2); -int qemuMonitorSystemReset(qemuMonitor *mon); -int qemuMonitorSystemPowerdown(qemuMonitor *mon); +int +qemuMonitorSystemReset(qemuMonitor *mon); + +int +qemuMonitorSystemPowerdown(qemuMonitor *mon); struct qemuMonitorQueryCpusEntry { int qemu_id; /* id of the cpu as reported by qemu */ @@ -593,8 +689,10 @@ struct qemuMonitorQueryCpusEntry { char *qom_path; bool halted; }; -void qemuMonitorQueryCpusFree(struct qemuMonitorQueryCpusEntry *entries, - size_t nentries); + +void +qemuMonitorQueryCpusFree(struct qemuMonitorQueryCpusEntry *entries, + size_t nentries); struct qemuMonitorQueryHotpluggableCpusEntry { @@ -617,8 +715,10 @@ struct qemuMonitorQueryHotpluggableCpusEntry { /* internal data */ int enable_id; }; -void qemuMonitorQueryHotpluggableCpusFree(struct qemuMonitorQueryHotpluggableCpusEntry *entries, - size_t nentries); + +void +qemuMonitorQueryHotpluggableCpusFree(struct qemuMonitorQueryHotpluggableCpusEntry *entries, + size_t nentries); struct _qemuMonitorCPUInfo { @@ -655,27 +755,39 @@ struct _qemuMonitorCPUInfo { }; typedef struct _qemuMonitorCPUInfo qemuMonitorCPUInfo; -void qemuMonitorCPUInfoFree(qemuMonitorCPUInfo *cpus, - size_t ncpus); -int qemuMonitorGetCPUInfo(qemuMonitor *mon, - qemuMonitorCPUInfo **vcpus, - size_t maxvcpus, - bool hotplug); +void +qemuMonitorCPUInfoFree(qemuMonitorCPUInfo *cpus, + size_t ncpus); + +int +qemuMonitorGetCPUInfo(qemuMonitor *mon, + qemuMonitorCPUInfo **vcpus, + size_t maxvcpus, + bool hotplug); + virBitmap *qemuMonitorGetCpuHalted(qemuMonitor *mon, size_t maxvcpus); -int qemuMonitorGetBalloonInfo(qemuMonitor *mon, - unsigned long long *currmem); -int qemuMonitorGetMemoryStats(qemuMonitor *mon, - virDomainMemballoonDef *balloon, - virDomainMemoryStatPtr stats, - unsigned int nr_stats); -int qemuMonitorSetMemoryStatsPeriod(qemuMonitor *mon, - virDomainMemballoonDef *balloon, - int period); +int +qemuMonitorGetBalloonInfo(qemuMonitor *mon, + unsigned long long *currmem); -int qemuMonitorBlockIOStatusToError(const char *status); -GHashTable *qemuMonitorGetBlockInfo(qemuMonitor *mon); +int +qemuMonitorGetMemoryStats(qemuMonitor *mon, + virDomainMemballoonDef *balloon, + virDomainMemoryStatPtr stats, + unsigned int nr_stats); + +int +qemuMonitorSetMemoryStatsPeriod(qemuMonitor *mon, + virDomainMemballoonDef *balloon, + int period); + +int +qemuMonitorBlockIOStatusToError(const char *status); + +GHashTable * +qemuMonitorGetBlockInfo(qemuMonitor *mon); typedef struct _qemuBlockStats qemuBlockStats; struct _qemuBlockStats { @@ -699,12 +811,14 @@ struct _qemuBlockStats { unsigned long long write_threshold; }; -int qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, - GHashTable **ret_stats) +int +qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, + GHashTable **ret_stats) ATTRIBUTE_NONNULL(2); -int qemuMonitorBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, - GHashTable *stats) +int +qemuMonitorBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, + GHashTable *stats) ATTRIBUTE_NONNULL(2); typedef struct _qemuBlockNamedNodeDataBitmap qemuBlockNamedNodeDataBitmap; @@ -754,39 +868,54 @@ struct _qemuBlockNamedNodeData { GHashTable * qemuMonitorBlockGetNamedNodeData(qemuMonitor *mon); -int qemuMonitorBlockResize(qemuMonitor *mon, - const char *device, - const char *nodename, - unsigned long long size); -int qemuMonitorSetPassword(qemuMonitor *mon, - int type, - const char *password, - const char *action_if_connected); -int qemuMonitorExpirePassword(qemuMonitor *mon, - int type, - const char *expire_time); -int qemuMonitorSetBalloon(qemuMonitor *mon, - unsigned long long newmem); - -int qemuMonitorSaveVirtualMemory(qemuMonitor *mon, - unsigned long long offset, - unsigned long long length, - const char *path); -int qemuMonitorSavePhysicalMemory(qemuMonitor *mon, - unsigned long long offset, - unsigned long long length, - const char *path); - -int qemuMonitorSetDBusVMStateIdList(qemuMonitor *mon, - GSList *list); - -int qemuMonitorSetUSBDiskAttached(qemuMonitor *mon, - const char *alias); - -int qemuMonitorGetMigrationParams(qemuMonitor *mon, - virJSONValue **params); -int qemuMonitorSetMigrationParams(qemuMonitor *mon, - virJSONValue **params); +int +qemuMonitorBlockResize(qemuMonitor *mon, + const char *device, + const char *nodename, + unsigned long long size); + +int +qemuMonitorSetPassword(qemuMonitor *mon, + int type, + const char *password, + const char *action_if_connected); + +int +qemuMonitorExpirePassword(qemuMonitor *mon, + int type, + const char *expire_time); + +int +qemuMonitorSetBalloon(qemuMonitor *mon, + unsigned long long newmem); + +int +qemuMonitorSaveVirtualMemory(qemuMonitor *mon, + unsigned long long offset, + unsigned long long length, + const char *path); + +int +qemuMonitorSavePhysicalMemory(qemuMonitor *mon, + unsigned long long offset, + unsigned long long length, + const char *path); + +int +qemuMonitorSetDBusVMStateIdList(qemuMonitor *mon, + GSList *list); + +int +qemuMonitorSetUSBDiskAttached(qemuMonitor *mon, + const char *alias); + +int +qemuMonitorGetMigrationParams(qemuMonitor *mon, + virJSONValue **params); + +int +qemuMonitorSetMigrationParams(qemuMonitor *mon, + virJSONValue **params); typedef enum { QEMU_MONITOR_MIGRATION_STATUS_INACTIVE, @@ -853,69 +982,85 @@ struct _qemuMonitorMigrationStats { unsigned long long vfio_data_transferred; }; -int qemuMonitorGetMigrationStats(qemuMonitor *mon, - qemuMonitorMigrationStats *stats, - char **error); +int +qemuMonitorGetMigrationStats(qemuMonitor *mon, + qemuMonitorMigrationStats *stats, + char **error); -int qemuMonitorGetMigrationCapabilities(qemuMonitor *mon, - char ***capabilities); -int qemuMonitorSetMigrationCapabilities(qemuMonitor *mon, - virJSONValue **caps); +int +qemuMonitorGetMigrationCapabilities(qemuMonitor *mon, + char ***capabilities); -int qemuMonitorGetGICCapabilities(qemuMonitor *mon, - virGICCapability **capabilities); +int +qemuMonitorSetMigrationCapabilities(qemuMonitor *mon, + virJSONValue **caps); -int qemuMonitorGetSEVCapabilities(qemuMonitor *mon, - virSEVCapability **capabilities); +int +qemuMonitorGetGICCapabilities(qemuMonitor *mon, + virGICCapability **capabilities); + +int +qemuMonitorGetSEVCapabilities(qemuMonitor *mon, + virSEVCapability **capabilities); -int qemuMonitorGetSGXCapabilities(qemuMonitor *mon, - virSGXCapability **capabilities); +int +qemuMonitorGetSGXCapabilities(qemuMonitor *mon, + virSGXCapability **capabilities); typedef enum { QEMU_MONITOR_MIGRATE_RESUME = 1 << 0, /* resume failed post-copy migration */ QEMU_MONITOR_MIGRATION_FLAGS_LAST } QEMU_MONITOR_MIGRATE; -int qemuMonitorMigrateToFd(qemuMonitor *mon, - unsigned int flags, - int fd); +int +qemuMonitorMigrateToFd(qemuMonitor *mon, + unsigned int flags, + int fd); -int qemuMonitorMigrateToFdSet(virDomainObj *vm, - unsigned int flags, - int *fd, - int *directFd); +int +qemuMonitorMigrateToFdSet(virDomainObj *vm, + unsigned int flags, + int *fd, + int *directFd); -int qemuMonitorMigrateToHost(qemuMonitor *mon, - unsigned int flags, - const char *protocol, - const char *hostname, - int port); +int +qemuMonitorMigrateToHost(qemuMonitor *mon, + unsigned int flags, + const char *protocol, + const char *hostname, + int port); -int qemuMonitorMigrateToSocket(qemuMonitor *mon, - unsigned int flags, - const char *socketPath); +int +qemuMonitorMigrateToSocket(qemuMonitor *mon, + unsigned int flags, + const char *socketPath); -int qemuMonitorMigrateCancel(qemuMonitor *mon); +int +qemuMonitorMigrateCancel(qemuMonitor *mon); int qemuMonitorMigratePause(qemuMonitor *mon); -int qemuMonitorGetDumpGuestMemoryCapability(qemuMonitor *mon, - const char *capability); +int +qemuMonitorGetDumpGuestMemoryCapability(qemuMonitor *mon, + const char *capability); -int qemuMonitorQueryDump(qemuMonitor *mon, - qemuMonitorDumpStats *stats); +int +qemuMonitorQueryDump(qemuMonitor *mon, + qemuMonitorDumpStats *stats); -int qemuMonitorDumpToFd(qemuMonitor *mon, - int fd, - const char *dumpformat); +int +qemuMonitorDumpToFd(qemuMonitor *mon, + int fd, + const char *dumpformat); -int qemuMonitorGraphicsRelocate(qemuMonitor *mon, - int type, - const char *hostname, - int port, - int tlsPort, - const char *tlsSubject); +int +qemuMonitorGraphicsRelocate(qemuMonitor *mon, + int type, + const char *hostname, + int port, + int tlsPort, + const char *tlsSubject); int qemuMonitorAddFileHandleToSet(qemuMonitor *mon, @@ -942,120 +1087,150 @@ struct _qemuMonitorFdsets { qemuMonitorFdsetInfo *fdsets; int nfdsets; }; -void qemuMonitorFdsetsFree(qemuMonitorFdsets *fdsets); + +void +qemuMonitorFdsetsFree(qemuMonitorFdsets *fdsets); G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMonitorFdsets, qemuMonitorFdsetsFree); -int qemuMonitorQueryFdsets(qemuMonitor *mon, - qemuMonitorFdsets **fdsets); -int qemuMonitorSendFileHandle(qemuMonitor *mon, - const char *fdname, - int fd); +int +qemuMonitorQueryFdsets(qemuMonitor *mon, + qemuMonitorFdsets **fdsets); + +int +qemuMonitorSendFileHandle(qemuMonitor *mon, + const char *fdname, + int fd); /* This function preserves previous error and only set their own * error if no error was set before. */ -int qemuMonitorCloseFileHandle(qemuMonitor *mon, - const char *fdname); +int +qemuMonitorCloseFileHandle(qemuMonitor *mon, + const char *fdname); -int qemuMonitorAddNetdev(qemuMonitor *mon, - virJSONValue **props); +int +qemuMonitorAddNetdev(qemuMonitor *mon, + virJSONValue **props); -int qemuMonitorRemoveNetdev(qemuMonitor *mon, - const char *alias); +int +qemuMonitorRemoveNetdev(qemuMonitor *mon, + const char *alias); -int qemuMonitorQueryRxFilter(qemuMonitor *mon, const char *alias, - virNetDevRxFilter **filter); +int +qemuMonitorQueryRxFilter(qemuMonitor *mon, + const char *alias, + virNetDevRxFilter **filter); typedef struct _qemuMonitorChardevInfo qemuMonitorChardevInfo; struct _qemuMonitorChardevInfo { char *ptyPath; virDomainChrDeviceState state; }; -void qemuMonitorChardevInfoFree(void *data); -int qemuMonitorGetChardevInfo(qemuMonitor *mon, - GHashTable **retinfo); +void +qemuMonitorChardevInfoFree(void *data); + +int +qemuMonitorGetChardevInfo(qemuMonitor *mon, + GHashTable **retinfo); -int qemuMonitorAddDeviceProps(qemuMonitor *mon, - virJSONValue **props); +int +qemuMonitorAddDeviceProps(qemuMonitor *mon, + virJSONValue **props); -int qemuMonitorDelDevice(qemuMonitor *mon, - const char *devalias); +int +qemuMonitorDelDevice(qemuMonitor *mon, + const char *devalias); -int qemuMonitorCreateObjectProps(virJSONValue **propsret, - const char *type, - const char *alias, - ...) +int +qemuMonitorCreateObjectProps(virJSONValue **propsret, + const char *type, + const char *alias, + ...) G_GNUC_NULL_TERMINATED; -int qemuMonitorAddObject(qemuMonitor *mon, - virJSONValue **props, - char **alias) +int +qemuMonitorAddObject(qemuMonitor *mon, + virJSONValue **props, + char **alias) ATTRIBUTE_NONNULL(2); -int qemuMonitorDelObject(qemuMonitor *mon, - const char *objalias, - bool report_error); +int +qemuMonitorDelObject(qemuMonitor *mon, + const char *objalias, + bool report_error); -int qemuMonitorTransaction(qemuMonitor *mon, virJSONValue **actions) +int +qemuMonitorTransaction(qemuMonitor *mon, + virJSONValue **actions) ATTRIBUTE_NONNULL(2); -int qemuMonitorBlockdevMirror(qemuMonitor *mon, - const char *jobname, - bool persistjob, - const char *device, - const char *target, - const char *replaces, - unsigned long long bandwidth, - unsigned int granularity, - unsigned long long buf_size, - bool shallow, - bool syncWrite) + +int +qemuMonitorBlockdevMirror(qemuMonitor *mon, + const char *jobname, + bool persistjob, + const char *device, + const char *target, + const char *replaces, + unsigned long long bandwidth, + unsigned int granularity, + unsigned long long buf_size, + bool shallow, + bool syncWrite) ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5); -int qemuMonitorBlockCommit(qemuMonitor *mon, - const char *device, - const char *jobname, - const char *topNode, - const char *baseNode, - const char *backingName, - unsigned long long bandwidth, - virTristateBool autofinalize) +int +qemuMonitorBlockCommit(qemuMonitor *mon, + const char *device, + const char *jobname, + const char *topNode, + const char *baseNode, + const char *backingName, + unsigned long long bandwidth, + virTristateBool autofinalize) ATTRIBUTE_NONNULL(2); -int qemuMonitorArbitraryCommand(qemuMonitor *mon, - const char *cmd, - int fd, - char **reply, - bool hmp); +int +qemuMonitorArbitraryCommand(qemuMonitor *mon, + const char *cmd, + int fd, + char **reply, + bool hmp); -int qemuMonitorInjectNMI(qemuMonitor *mon); +int +qemuMonitorInjectNMI(qemuMonitor *mon); -int qemuMonitorScreendump(qemuMonitor *mon, - const char *device, - unsigned int head, - const char *format, - const char *file); - -int qemuMonitorSendKey(qemuMonitor *mon, - unsigned int holdtime, - unsigned int *keycodes, - unsigned int nkeycodes); - -int qemuMonitorBlockStream(qemuMonitor *mon, - const char *device, - const char *jobname, - const char *baseNode, - const char *backingName, - unsigned long long bandwidth) +int +qemuMonitorScreendump(qemuMonitor *mon, + const char *device, + unsigned int head, + const char *format, + const char *file); + +int +qemuMonitorSendKey(qemuMonitor *mon, + unsigned int holdtime, + unsigned int *keycodes, + unsigned int nkeycodes); + +int +qemuMonitorBlockStream(qemuMonitor *mon, + const char *device, + const char *jobname, + const char *baseNode, + const char *backingName, + unsigned long long bandwidth) ATTRIBUTE_NONNULL(2); -int qemuMonitorBlockJobCancel(qemuMonitor *mon, - const char *jobname, - bool force) +int +qemuMonitorBlockJobCancel(qemuMonitor *mon, + const char *jobname, + bool force) ATTRIBUTE_NONNULL(2); -int qemuMonitorBlockJobSetSpeed(qemuMonitor *mon, - const char *jobname, - unsigned long long bandwidth); +int +qemuMonitorBlockJobSetSpeed(qemuMonitor *mon, + const char *jobname, + unsigned long long bandwidth); typedef struct _qemuMonitorBlockJobInfo qemuMonitorBlockJobInfo; struct _qemuMonitorBlockJobInfo { @@ -1067,11 +1242,13 @@ struct _qemuMonitorBlockJobInfo { bool ready; }; -GHashTable *qemuMonitorGetAllBlockJobInfo(qemuMonitor *mon, - bool rawjobname); +GHashTable * +qemuMonitorGetAllBlockJobInfo(qemuMonitor *mon, + bool rawjobname); -int qemuMonitorJobDismiss(qemuMonitor *mon, - const char *jobname) +int +qemuMonitorJobDismiss(qemuMonitor *mon, + const char *jobname) ATTRIBUTE_NONNULL(2); int @@ -1079,23 +1256,27 @@ qemuMonitorJobFinalize(qemuMonitor *mon, const char *jobname) ATTRIBUTE_NONNULL(2); -int qemuMonitorJobComplete(qemuMonitor *mon, - const char *jobname) +int +qemuMonitorJobComplete(qemuMonitor *mon, + const char *jobname) ATTRIBUTE_NONNULL(2); -int qemuMonitorOpenGraphics(qemuMonitor *mon, - const char *protocol, - int fd, - const char *fdname, - bool skipauth); +int +qemuMonitorOpenGraphics(qemuMonitor *mon, + const char *protocol, + int fd, + const char *fdname, + bool skipauth); -int qemuMonitorSetBlockIoThrottle(qemuMonitor *mon, - const char *qomid, - virDomainBlockIoTuneInfo *info); +int +qemuMonitorSetBlockIoThrottle(qemuMonitor *mon, + const char *qomid, + virDomainBlockIoTuneInfo *info); -int qemuMonitorGetBlockIoThrottle(qemuMonitor *mon, - const char *qdevid, - virDomainBlockIoTuneInfo *reply); +int +qemuMonitorGetBlockIoThrottle(qemuMonitor *mon, + const char *qdevid, + virDomainBlockIoTuneInfo *reply); int qemuMonitorThrottleGroupLimits(virJSONValue *limits, @@ -1106,13 +1287,15 @@ qemuMonitorUpdateThrottleGroup(qemuMonitor *mon, const char *qomid, virDomainBlockIoTuneInfo *info); -int qemuMonitorSystemWakeup(qemuMonitor *mon); +int +qemuMonitorSystemWakeup(qemuMonitor *mon); -int qemuMonitorGetVersion(qemuMonitor *mon, - int *major, - int *minor, - int *micro, - char **package) +int +qemuMonitorGetVersion(qemuMonitor *mon, + int *major, + int *minor, + int *micro, + char **package) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4); @@ -1130,10 +1313,12 @@ struct _qemuMonitorMachineInfo { virTristateBool acpi; }; -int qemuMonitorGetMachines(qemuMonitor *mon, - qemuMonitorMachineInfo ***machines); +int +qemuMonitorGetMachines(qemuMonitor *mon, + qemuMonitorMachineInfo ***machines); -void qemuMonitorMachineInfoFree(qemuMonitorMachineInfo *machine); +void +qemuMonitorMachineInfoFree(qemuMonitorMachineInfo *machine); typedef struct _qemuMonitorCPUDefInfo qemuMonitorCPUDefInfo; struct _qemuMonitorCPUDefInfo { @@ -1150,11 +1335,19 @@ struct _qemuMonitorCPUDefs { qemuMonitorCPUDefInfo *cpus; }; -int qemuMonitorGetCPUDefinitions(qemuMonitor *mon, - qemuMonitorCPUDefs **cpuDefs); -qemuMonitorCPUDefs *qemuMonitorCPUDefsNew(size_t count); -qemuMonitorCPUDefs *qemuMonitorCPUDefsCopy(qemuMonitorCPUDefs *src); -void qemuMonitorCPUDefsFree(qemuMonitorCPUDefs *defs); +int +qemuMonitorGetCPUDefinitions(qemuMonitor *mon, + qemuMonitorCPUDefs **cpuDefs); + +qemuMonitorCPUDefs * +qemuMonitorCPUDefsNew(size_t count); + +qemuMonitorCPUDefs * +qemuMonitorCPUDefsCopy(qemuMonitorCPUDefs *src); + +void +qemuMonitorCPUDefsFree(qemuMonitorCPUDefs *defs); + G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMonitorCPUDefs, qemuMonitorCPUDefsFree); @@ -1195,87 +1388,114 @@ typedef enum { QEMU_MONITOR_CPU_MODEL_EXPANSION_FULL, } qemuMonitorCPUModelExpansionType; -int qemuMonitorGetCPUModelExpansion(qemuMonitor *mon, - qemuMonitorCPUModelExpansionType type, - virCPUDef *cpu, - bool migratable, - bool hv_passthrough, - bool fail_no_props, - qemuMonitorCPUModelInfo **model_info); +int +qemuMonitorGetCPUModelExpansion(qemuMonitor *mon, + qemuMonitorCPUModelExpansionType type, + virCPUDef *cpu, + bool migratable, + bool hv_passthrough, + bool fail_no_props, + qemuMonitorCPUModelInfo **model_info); + +void +qemuMonitorCPUModelInfoFree(qemuMonitorCPUModelInfo *model_info); -void qemuMonitorCPUModelInfoFree(qemuMonitorCPUModelInfo *model_info); G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMonitorCPUModelInfo, qemuMonitorCPUModelInfoFree); -int qemuMonitorGetCPUModelBaseline(qemuMonitor *mon, - virCPUDef *cpu_a, - virCPUDef *cpu_b, - qemuMonitorCPUModelInfo **baseline); +int +qemuMonitorGetCPUModelBaseline(qemuMonitor *mon, + virCPUDef *cpu_a, + virCPUDef *cpu_b, + qemuMonitorCPUModelInfo **baseline); -int qemuMonitorGetCPUModelComparison(qemuMonitor *mon, - virCPUDef *cpu_a, - virCPUDef *cpu_b, - char **result); +int +qemuMonitorGetCPUModelComparison(qemuMonitor *mon, + virCPUDef *cpu_a, + virCPUDef *cpu_b, + char **result); qemuMonitorCPUModelInfo * qemuMonitorCPUModelInfoCopy(const qemuMonitorCPUModelInfo *orig); -GHashTable *qemuMonitorGetCommandLineOptions(qemuMonitor *mon); +GHashTable * +qemuMonitorGetCommandLineOptions(qemuMonitor *mon); -int qemuMonitorGetKVMState(qemuMonitor *mon, - bool *enabled, - bool *present); +int +qemuMonitorGetKVMState(qemuMonitor *mon, + bool *enabled, + bool *present); -int qemuMonitorGetObjectTypes(qemuMonitor *mon, - char ***types); -GHashTable *qemuMonitorGetDeviceProps(qemuMonitor *mon, - const char *device); -int qemuMonitorGetObjectProps(qemuMonitor *mon, - const char *object, - char ***props); -char *qemuMonitorGetTargetArch(qemuMonitor *mon); +int +qemuMonitorGetObjectTypes(qemuMonitor *mon, + char ***types); + +GHashTable * +qemuMonitorGetDeviceProps(qemuMonitor *mon, + const char *device); + +int +qemuMonitorGetObjectProps(qemuMonitor *mon, + const char *object, + char ***props); + +char * +qemuMonitorGetTargetArch(qemuMonitor *mon); -int qemuMonitorNBDServerStart(qemuMonitor *mon, - const virStorageNetHostDef *server, - const char *tls_alias) +int +qemuMonitorNBDServerStart(qemuMonitor *mon, + const virStorageNetHostDef *server, + const char *tls_alias) ATTRIBUTE_NONNULL(2); -int qemuMonitorNBDServerStop(qemuMonitor *mon); -int qemuMonitorBlockExportAdd(qemuMonitor *mon, - virJSONValue **props); +int +qemuMonitorNBDServerStop(qemuMonitor *mon); + +int +qemuMonitorBlockExportAdd(qemuMonitor *mon, + virJSONValue **props); + +int +qemuMonitorAttachCharDev(qemuMonitor *mon, + virJSONValue **props, + char **ptypath); -int qemuMonitorAttachCharDev(qemuMonitor *mon, - virJSONValue **props, - char **ptypath); -int qemuMonitorDetachCharDev(qemuMonitor *mon, - const char *chrID); +int +qemuMonitorDetachCharDev(qemuMonitor *mon, + const char *chrID); -int qemuMonitorGetDeviceAliases(qemuMonitor *mon, - char ***aliases); +int +qemuMonitorGetDeviceAliases(qemuMonitor *mon, + char ***aliases); typedef void (*qemuMonitorReportDomainLogError)(qemuMonitor *mon, const char *msg, void *opaque); -void qemuMonitorSetDomainLogLocked(qemuMonitor *mon, - qemuMonitorReportDomainLogError func, - void *opaque, - virFreeCallback destroy); -void qemuMonitorSetDomainLog(qemuMonitor *mon, - qemuMonitorReportDomainLogError func, - void *opaque, - virFreeCallback destroy); +void +qemuMonitorSetDomainLogLocked(qemuMonitor *mon, + qemuMonitorReportDomainLogError func, + void *opaque, + virFreeCallback destroy); + +void +qemuMonitorSetDomainLog(qemuMonitor *mon, + qemuMonitorReportDomainLogError func, + void *opaque, + virFreeCallback destroy); typedef const char *(*qemuMonitorCPUFeatureTranslationCallback)(virArch arch, const char *name); -int qemuMonitorGetGuestCPU(qemuMonitor *mon, - virArch arch, - bool qomListGet, - const char *cpuQOMPath, - qemuMonitorCPUFeatureTranslationCallback translate, - virCPUData **enabled, - virCPUData **disabled); +int +qemuMonitorGetGuestCPU(qemuMonitor *mon, + virArch arch, + bool qomListGet, + const char *cpuQOMPath, + qemuMonitorCPUFeatureTranslationCallback translate, + virCPUData **enabled, + virCPUData **disabled); -int qemuMonitorRTCResetReinjection(qemuMonitor *mon); +int +qemuMonitorRTCResetReinjection(qemuMonitor *mon); typedef struct _qemuMonitorIOThreadInfo qemuMonitorIOThreadInfo; struct _qemuMonitorIOThreadInfo { @@ -1293,11 +1513,14 @@ struct _qemuMonitorIOThreadInfo { bool set_thread_pool_min; bool set_thread_pool_max; }; -int qemuMonitorGetIOThreads(qemuMonitor *mon, - qemuMonitorIOThreadInfo ***iothreads, - int *niothreads); -int qemuMonitorSetIOThread(qemuMonitor *mon, - qemuMonitorIOThreadInfo *iothreadInfo); + +int +qemuMonitorGetIOThreads(qemuMonitor *mon, + qemuMonitorIOThreadInfo ***iothreads, + int *niothreads); +int +qemuMonitorSetIOThread(qemuMonitor *mon, + qemuMonitorIOThreadInfo *iothreadInfo); typedef struct _qemuMonitorMemoryDeviceInfo qemuMonitorMemoryDeviceInfo; struct _qemuMonitorMemoryDeviceInfo { @@ -1310,57 +1533,73 @@ struct _qemuMonitorMemoryDeviceInfo { unsigned long long size; /* in bytes */ }; -int qemuMonitorGetMemoryDeviceInfo(qemuMonitor *mon, - GHashTable **info) +int +qemuMonitorGetMemoryDeviceInfo(qemuMonitor *mon, + GHashTable **info) ATTRIBUTE_NONNULL(2); -int qemuMonitorMigrateIncoming(qemuMonitor *mon, - const char *uri, - virTristateBool exitOnError); +int +qemuMonitorMigrateIncoming(qemuMonitor *mon, + const char *uri, + virTristateBool exitOnError); -int qemuMonitorMigrateStartPostCopy(qemuMonitor *mon); +int +qemuMonitorMigrateStartPostCopy(qemuMonitor *mon); -int qemuMonitorMigrateContinue(qemuMonitor *mon, - qemuMonitorMigrationStatus status); +int +qemuMonitorMigrateContinue(qemuMonitor *mon, + qemuMonitorMigrationStatus status); -int qemuMonitorGetRTCTime(qemuMonitor *mon, - struct tm *tm); +int +qemuMonitorGetRTCTime(qemuMonitor *mon, + struct tm *tm); -virJSONValue *qemuMonitorQueryQMPSchema(qemuMonitor *mon); +virJSONValue * +qemuMonitorQueryQMPSchema(qemuMonitor *mon); -int qemuMonitorSetBlockThreshold(qemuMonitor *mon, - const char *nodename, - unsigned long long threshold); +int +qemuMonitorSetBlockThreshold(qemuMonitor *mon, + const char *nodename, + unsigned long long threshold); -int qemuMonitorSetWatchdogAction(qemuMonitor *mon, - const char *action); +int +qemuMonitorSetWatchdogAction(qemuMonitor *mon, + const char *action); -int qemuMonitorBlockdevCreate(qemuMonitor *mon, - const char *jobname, - virJSONValue **props); +int +qemuMonitorBlockdevCreate(qemuMonitor *mon, + const char *jobname, + virJSONValue **props); -int qemuMonitorBlockdevAdd(qemuMonitor *mon, - virJSONValue **props); +int +qemuMonitorBlockdevAdd(qemuMonitor *mon, + virJSONValue **props); -int qemuMonitorBlockdevReopen(qemuMonitor *mon, - virJSONValue **options); +int +qemuMonitorBlockdevReopen(qemuMonitor *mon, + virJSONValue **options); -int qemuMonitorBlockdevDel(qemuMonitor *mon, - const char *nodename); +int +qemuMonitorBlockdevDel(qemuMonitor *mon, + const char *nodename); -int qemuMonitorBlockdevTrayOpen(qemuMonitor *mon, - const char *id, - bool force); +int +qemuMonitorBlockdevTrayOpen(qemuMonitor *mon, + const char *id, + bool force); -int qemuMonitorBlockdevTrayClose(qemuMonitor *mon, - const char *id); +int +qemuMonitorBlockdevTrayClose(qemuMonitor *mon, + const char *id); -int qemuMonitorBlockdevMediumRemove(qemuMonitor *mon, - const char *id); +int +qemuMonitorBlockdevMediumRemove(qemuMonitor *mon, + const char *id); -int qemuMonitorBlockdevMediumInsert(qemuMonitor *mon, - const char *id, - const char *nodename); +int +qemuMonitorBlockdevMediumInsert(qemuMonitor *mon, + const char *id, + const char *nodename); char * qemuMonitorGetSEVMeasurement(qemuMonitor *mon); @@ -1415,23 +1654,27 @@ struct _qemuMonitorPRManagerInfo { bool connected; }; -int qemuMonitorGetPRManagerInfo(qemuMonitor *mon, - GHashTable **retinfo); +int +qemuMonitorGetPRManagerInfo(qemuMonitor *mon, + GHashTable **retinfo); typedef struct _qemuMonitorCurrentMachineInfo qemuMonitorCurrentMachineInfo; struct _qemuMonitorCurrentMachineInfo { bool wakeupSuspendSupport; }; -int qemuMonitorGetCurrentMachineInfo(qemuMonitor *mon, - qemuMonitorCurrentMachineInfo *info); -void qemuMonitorJobInfoFree(qemuMonitorJobInfo *job); +int +qemuMonitorGetCurrentMachineInfo(qemuMonitor *mon, + qemuMonitorCurrentMachineInfo *info); +void +qemuMonitorJobInfoFree(qemuMonitorJobInfo *job); G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMonitorJobInfo, qemuMonitorJobInfoFree); -int qemuMonitorGetJobInfo(qemuMonitor *mon, - qemuMonitorJobInfo ***jobs, - size_t *njobs); +int +qemuMonitorGetJobInfo(qemuMonitor *mon, + qemuMonitorJobInfo ***jobs, + size_t *njobs); int qemuMonitorGetCPUMigratable(qemuMonitor *mon, -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> Create the g_object boilerplate and store references in the hash table instead of copies. This will simplify upcoming code which will add allocated fields into qemuBlockStats. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_driver.c | 32 ++++++----------------- src/qemu/qemu_monitor.c | 38 ++++++++++++++++++++++++++- src/qemu/qemu_monitor.h | 7 ++++- src/qemu/qemu_monitor_json.c | 50 ++++++++---------------------------- 4 files changed, 62 insertions(+), 65 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ac72ea5cb0..b6d83f1dc6 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -9613,7 +9613,6 @@ qemuDomainBlocksStatsGather(virDomainObj *vm, qemuDomainObjPrivate *priv = vm->privateData; virDomainDiskDef *disk = NULL; g_autoptr(GHashTable) blockstats = NULL; - qemuBlockStats *stats; size_t i; int nstats; int rc = 0; @@ -9654,29 +9653,15 @@ qemuDomainBlocksStatsGather(virDomainObj *vm, if (nstats < 0 || rc < 0) return -1; - *retstats = g_new0(qemuBlockStats, 1); - if (entryname) { - qemuBlockStats *capstats; - - if (!(stats = virHashLookup(blockstats, entryname))) { + if (!(*retstats = virHashSteal(blockstats, entryname))) { virReportError(VIR_ERR_INTERNAL_ERROR, _("cannot find statistics for device '%1$s'"), entryname); return -1; } - - **retstats = *stats; - - /* capacity are reported only per node-name so we need to transfer them */ - if (disk && disk->src && - (capstats = virHashLookup(blockstats, qemuBlockStorageSourceGetEffectiveNodename(disk->src)))) { - (*retstats)->capacity = capstats->capacity; - (*retstats)->physical = capstats->physical; - (*retstats)->wr_highest_offset = capstats->wr_highest_offset; - (*retstats)->wr_highest_offset_valid = capstats->wr_highest_offset_valid; - (*retstats)->write_threshold = capstats->write_threshold; - } } else { + g_autoptr(qemuBlockStats) stats = qemuBlockStatsNew(); + for (i = 0; i < vm->def->ndisks; i++) { disk = vm->def->disks[i]; entryname = disk->info.alias; @@ -9699,6 +9684,8 @@ qemuDomainBlocksStatsGather(virDomainObj *vm, qemuDomainBlockStatsGatherTotals(stats, *retstats); } + + *retstats = g_steal_pointer(&stats); } return nstats; @@ -9710,7 +9697,7 @@ qemuDomainBlockStats(virDomainPtr dom, const char *path, virDomainBlockStatsPtr stats) { - qemuBlockStats *blockstats = NULL; + g_autoptr(qemuBlockStats) blockstats = NULL; int ret = -1; virDomainObj *vm; @@ -9747,7 +9734,6 @@ qemuDomainBlockStats(virDomainPtr dom, cleanup: virDomainObjEndAPI(&vm); - VIR_FREE(blockstats); return ret; } @@ -9760,7 +9746,7 @@ qemuDomainBlockStatsFlags(virDomainPtr dom, unsigned int flags) { virDomainObj *vm; - qemuBlockStats *blockstats = NULL; + g_autoptr(qemuBlockStats) blockstats = NULL; int nstats; int ret = -1; @@ -9833,7 +9819,6 @@ qemuDomainBlockStatsFlags(virDomainPtr dom, virDomainObjEndJob(vm); cleanup: - VIR_FREE(blockstats); virDomainObjEndAPI(&vm); return ret; } @@ -10565,7 +10550,7 @@ qemuDomainGetBlockInfo(virDomainPtr dom, int ret = -1; virDomainDiskDef *disk; g_autoptr(virQEMUDriverConfig) cfg = NULL; - qemuBlockStats *entry = NULL; + g_autoptr(qemuBlockStats) entry = NULL; virCheckFlags(0, -1); @@ -10663,7 +10648,6 @@ qemuDomainGetBlockInfo(virDomainPtr dom, endjob: virDomainObjEndJob(vm); cleanup: - VIR_FREE(entry); virDomainObjEndAPI(&vm); return ret; } diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 7b09792c5d..ce6220fbfb 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1967,6 +1967,42 @@ qemuMonitorGetBlockInfo(qemuMonitor *mon) } +G_DEFINE_TYPE(qemuBlockStats, qemu_block_stats, G_TYPE_OBJECT); + +static void +qemu_block_stats_init(qemuBlockStats *stats G_GNUC_UNUSED) +{ +} + + +static void +qemuBlockStatsFinalize(GObject *object) +{ + qemuBlockStats *stats = QEMU_BLOCK_STATS(object); + + if (!stats) + return; + + G_OBJECT_CLASS(qemu_block_stats_parent_class)->finalize(object); +} + + +static void +qemu_block_stats_class_init(qemuBlockStatsClass *klass) +{ + GObjectClass *obj = G_OBJECT_CLASS(klass); + + obj->finalize = qemuBlockStatsFinalize; +} + + +qemuBlockStats * +qemuBlockStatsNew(void) +{ + return g_object_new(qemu_block_stats_get_type(), NULL); +} + + /** * qemuMonitorGetAllBlockStatsInfo: * @mon: monitor object @@ -1982,7 +2018,7 @@ qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, GHashTable **ret_stats) { int ret; - g_autoptr(GHashTable) stats = virHashNew(g_free); + g_autoptr(GHashTable) stats = virHashNew(g_object_unref); QEMU_CHECK_MONITOR(mon); diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 82354a83d9..4f94edb05f 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -789,8 +789,9 @@ qemuMonitorBlockIOStatusToError(const char *status); GHashTable * qemuMonitorGetBlockInfo(qemuMonitor *mon); -typedef struct _qemuBlockStats qemuBlockStats; struct _qemuBlockStats { + GObject parent; + unsigned long long rd_req; unsigned long long rd_bytes; unsigned long long wr_req; @@ -810,6 +811,10 @@ struct _qemuBlockStats { /* write_threshold is valid only if it's non-zero, conforming to qemu semantics */ unsigned long long write_threshold; }; +G_DECLARE_FINAL_TYPE(qemuBlockStats, qemu_block_stats, QEMU, BLOCK_STATS, GObject); + +qemuBlockStats * +qemuBlockStatsNew(void); int qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 2dbaa7a798..7b7d446b3a 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2390,7 +2390,7 @@ static qemuBlockStats * qemuMonitorJSONBlockStatsCollectData(virJSONValue *dev, int *nstats) { - g_autofree qemuBlockStats *bstats = NULL; + g_autoptr(qemuBlockStats) bstats = NULL; virJSONValue *parent; virJSONValue *parentstats; virJSONValue *stats; @@ -2401,7 +2401,7 @@ qemuMonitorJSONBlockStatsCollectData(virJSONValue *dev, return NULL; } - bstats = g_new0(qemuBlockStats, 1); + bstats = qemuBlockStatsNew(); #define QEMU_MONITOR_BLOCK_STAT_GET(NAME, VAR, MANDATORY) \ if (MANDATORY || virJSONValueObjectHasKey(stats, NAME)) { \ @@ -2433,34 +2433,13 @@ qemuMonitorJSONBlockStatsCollectData(virJSONValue *dev, } -static int -qemuMonitorJSONAddOneBlockStatsInfo(qemuBlockStats *bstats, - const char *name, - GHashTable *stats) -{ - qemuBlockStats *copy = NULL; - - copy = g_new0(qemuBlockStats, 1); - - if (bstats) - *copy = *bstats; - - if (virHashAddEntry(stats, name, copy) < 0) { - VIR_FREE(copy); - return -1; - } - - return 0; -} - - static int qemuMonitorJSONGetOneBlockStatsInfo(virJSONValue *dev, const char *dev_name, int depth, GHashTable *hash) { - g_autofree qemuBlockStats *bstats = NULL; + g_autoptr(qemuBlockStats) bstats = NULL; int nstats = 0; const char *qdevname = NULL; const char *nodename = NULL; @@ -2482,17 +2461,14 @@ qemuMonitorJSONGetOneBlockStatsInfo(virJSONValue *dev, if (!(bstats = qemuMonitorJSONBlockStatsCollectData(dev, &nstats))) return -1; - if (devicename && - qemuMonitorJSONAddOneBlockStatsInfo(bstats, devicename, hash) < 0) - return -1; + if (devicename) + g_hash_table_insert(hash, g_strdup(devicename), g_object_ref(bstats)); - if (qdevname && STRNEQ_NULLABLE(qdevname, devicename) && - qemuMonitorJSONAddOneBlockStatsInfo(bstats, qdevname, hash) < 0) - return -1; + if (qdevname && STRNEQ_NULLABLE(qdevname, devicename)) + g_hash_table_insert(hash, g_strdup(qdevname), g_object_ref(bstats)); - if (nodename && - qemuMonitorJSONAddOneBlockStatsInfo(bstats, nodename, hash) < 0) - return -1; + if (nodename) + g_hash_table_insert(hash, g_strdup(nodename), g_object_ref(bstats)); if ((backing = virJSONValueObjectGetObject(dev, "backing")) && qemuMonitorJSONGetOneBlockStatsInfo(backing, dev_name, depth + 1, hash) < 0) @@ -2617,12 +2593,8 @@ qemuMonitorJSONBlockStatsUpdateCapacityData(virJSONValue *image, qemuBlockStats *bstats; if (!(bstats = virHashLookup(stats, name))) { - bstats = g_new0(qemuBlockStats, 1); - - if (virHashAddEntry(stats, name, bstats) < 0) { - VIR_FREE(bstats); - return -1; - } + bstats = qemuBlockStatsNew(); + g_hash_table_insert(stats, g_strdup(name), bstats); } if (entry) -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> 'qemuMonitorBlockStatsUpdateCapacityBlockdev' uses the same command internally. Upcoming patches will want to merge qemuMonitorBlockStatsUpdateCapacityBlockdev into qemuMonitorGetAllBlockStatsInfo and qemuMigrationCookieAddNBD is the only place that doesn't call qemuMonitorGetAllBlockStatsInfo. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_migration_cookie.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c index 01529c99b8..7311a8294b 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -478,9 +478,8 @@ qemuMigrationCookieAddNBD(qemuMigrationCookie *mig, virDomainObj *vm) { qemuDomainObjPrivate *priv = vm->privateData; - g_autoptr(GHashTable) stats = virHashNew(g_free); + g_autoptr(GHashTable) blockNamedNodeData = NULL; size_t i; - int rc; /* It is not a bug if there already is a NBD data */ qemuMigrationCookieNBDFree(mig->nbd); @@ -496,21 +495,15 @@ qemuMigrationCookieAddNBD(qemuMigrationCookie *mig, mig->nbd->disks = g_new0(struct qemuMigrationCookieNBDDisk, vm->def->ndisks); mig->nbd->ndisks = 0; - if (qemuDomainObjEnterMonitorAsync(vm, vm->job->asyncJob) < 0) - return -1; - - rc = qemuMonitorBlockStatsUpdateCapacityBlockdev(priv->mon, stats); - - qemuDomainObjExitMonitor(vm); - - if (rc < 0) + if (!(blockNamedNodeData = qemuBlockGetNamedNodeData(vm, vm->job->asyncJob))) return -1; for (i = 0; i < vm->def->ndisks; i++) { virDomainDiskDef *disk = vm->def->disks[i]; - qemuBlockStats *entry; + qemuBlockNamedNodeData *entry; - if (!(entry = virHashLookup(stats, qemuBlockStorageSourceGetEffectiveNodename(disk->src)))) + if (!(entry = virHashLookup(blockNamedNodeData, + qemuBlockStorageSourceGetEffectiveNodename(disk->src)))) continue; mig->nbd->disks[mig->nbd->ndisks].target = g_strdup(disk->dst); -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> It's called just from qemuMonitorJSONBlockStatsUpdateCapacityBlockdevWorker. Merging it in makes the code much simpler especially when combined with a change to APIs that can't fail. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_monitor_json.c | 48 ++++++++++-------------------------- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 7b7d446b3a..44d7a35874 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2584,36 +2584,6 @@ qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, } -static int -qemuMonitorJSONBlockStatsUpdateCapacityData(virJSONValue *image, - const char *name, - GHashTable *stats, - qemuBlockStats **entry) -{ - qemuBlockStats *bstats; - - if (!(bstats = virHashLookup(stats, name))) { - bstats = qemuBlockStatsNew(); - g_hash_table_insert(stats, g_strdup(name), bstats); - } - - if (entry) - *entry = bstats; - - /* failures can be ignored after this point */ - if (virJSONValueObjectGetNumberUlong(image, "virtual-size", - &bstats->capacity) < 0) - return 0; - - /* if actual-size is missing, image is not thin provisioned */ - if (virJSONValueObjectGetNumberUlong(image, "actual-size", - &bstats->physical) < 0) - bstats->physical = bstats->capacity; - - return 0; -} - - static int qemuMonitorJSONBlockStatsUpdateCapacityBlockdevWorker(size_t pos G_GNUC_UNUSED, virJSONValue *val, @@ -2631,12 +2601,20 @@ qemuMonitorJSONBlockStatsUpdateCapacityBlockdevWorker(size_t pos G_GNUC_UNUSED, return -1; } - if (qemuMonitorJSONBlockStatsUpdateCapacityData(image, nodename, stats, &entry) < 0) - return -1; + if (!(entry = virHashLookup(stats, nodename))) { + entry = qemuBlockStatsNew(); + g_hash_table_insert(stats, g_strdup(nodename), entry); + } + + /* updating actual size makes sense only when virtual size is present */ + if (virJSONValueObjectGetNumberUlong(image, "virtual-size", &entry->capacity) == 0) { + /* if actual-size is missing, image is not thin provisioned */ + if (virJSONValueObjectGetNumberUlong(image, "actual-size", &entry->physical) < 0) + entry->physical = entry->capacity; + } - if (entry) - ignore_value(virJSONValueObjectGetNumberUlong(val, "write_threshold", - &entry->write_threshold)); + ignore_value(virJSONValueObjectGetNumberUlong(val, "write_threshold", + &entry->write_threshold)); return 1; /* we don't want to steal the value from the JSON array */ } -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> Currently the data which was probed for statistics from 'query-named-block-nodes' was updated in a separate call in qemuMonitorJSONBlockStatsUpdateCapacityBlockdev. This patch moves and adapts the code so that everything is probed in qemuMonitorJSONGetAllBlockStatsInfo. qemuMonitorJSONBlockStatsUpdateCapacityBlockdev is now an empty function and will be removed later. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_monitor_json.c | 90 ++++++++++++++++++------------------ tests/qemumonitorjsontest.c | 2 + 2 files changed, 47 insertions(+), 45 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 44d7a35874..0aa74e226d 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2524,6 +2524,42 @@ qemuMonitorJSONQueryBlockstats(qemuMonitor *mon, } +static int +qemuMonitorJSONGetOneBlockStatsNamedNodes(size_t pos G_GNUC_UNUSED, + virJSONValue *val, + void *opaque) +{ + GHashTable *stats = opaque; + virJSONValue *image; + const char *nodename; + qemuBlockStats *entry; + + if (!(nodename = virJSONValueObjectGetString(val, "node-name")) || + !(image = virJSONValueObjectGetObject(val, "image"))) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("query-named-block-nodes entry was not in expected format")); + return -1; + } + + if (!(entry = virHashLookup(stats, nodename))) { + entry = qemuBlockStatsNew(); + g_hash_table_insert(stats, g_strdup(nodename), entry); + } + + /* updating actual size makes sense only when virtual size is present */ + if (virJSONValueObjectGetNumberUlong(image, "virtual-size", &entry->capacity) == 0) { + /* if actual-size is missing, image is not thin provisioned */ + if (virJSONValueObjectGetNumberUlong(image, "actual-size", &entry->physical) < 0) + entry->physical = entry->capacity; + } + + ignore_value(virJSONValueObjectGetNumberUlong(val, "write_threshold", + &entry->write_threshold)); + + return 1; /* we don't want to steal the value from the JSON array */ +} + + int qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, GHashTable *hash) @@ -2533,6 +2569,7 @@ qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, size_t i; g_autoptr(virJSONValue) blockstatsDevices = NULL; g_autoptr(virJSONValue) blockstatsNodes = NULL; + g_autoptr(virJSONValue) nodes = NULL; if (!(blockstatsDevices = qemuMonitorJSONQueryBlockstats(mon, false))) return -1; @@ -2580,59 +2617,22 @@ qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, nstats = rc; } - return nstats; -} - - -static int -qemuMonitorJSONBlockStatsUpdateCapacityBlockdevWorker(size_t pos G_GNUC_UNUSED, - virJSONValue *val, - void *opaque) -{ - GHashTable *stats = opaque; - virJSONValue *image; - const char *nodename; - qemuBlockStats *entry; - - if (!(nodename = virJSONValueObjectGetString(val, "node-name")) || - !(image = virJSONValueObjectGetObject(val, "image"))) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("query-named-block-nodes entry was not in expected format")); + if (!(nodes = qemuMonitorJSONQueryNamedBlockNodes(mon))) return -1; - } - - if (!(entry = virHashLookup(stats, nodename))) { - entry = qemuBlockStatsNew(); - g_hash_table_insert(stats, g_strdup(nodename), entry); - } - - /* updating actual size makes sense only when virtual size is present */ - if (virJSONValueObjectGetNumberUlong(image, "virtual-size", &entry->capacity) == 0) { - /* if actual-size is missing, image is not thin provisioned */ - if (virJSONValueObjectGetNumberUlong(image, "actual-size", &entry->physical) < 0) - entry->physical = entry->capacity; - } - ignore_value(virJSONValueObjectGetNumberUlong(val, "write_threshold", - &entry->write_threshold)); + if (virJSONValueArrayForeachSteal(nodes, + qemuMonitorJSONGetOneBlockStatsNamedNodes, + hash) < 0) + return -1; - return 1; /* we don't want to steal the value from the JSON array */ + return nstats; } int -qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, - GHashTable *stats) +qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon G_GNUC_UNUSED, + GHashTable *stats G_GNUC_UNUSED) { - g_autoptr(virJSONValue) nodes = NULL; - - if (!(nodes = qemuMonitorJSONQueryNamedBlockNodes(mon))) - return -1; - - if (virJSONValueArrayForeachSteal(nodes, - qemuMonitorJSONBlockStatsUpdateCapacityBlockdevWorker, - stats) < 0) - return -1; return 0; } diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 7b56a507ea..a229a89860 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1544,6 +1544,8 @@ testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInfo(const void *opaque) return -1; if (qemuMonitorTestAddItem(test, "query-blockstats", reply) < 0) return -1; + if (qemuMonitorTestAddItem(test, "query-named-block-nodes", "{\"return\":[]}") < 0) + return -1; #define CHECK0FULL(var, value, varformat, valformat) \ if (stats->var != value) { \ -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> Remove the function and address the ripple effect the removal has. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_driver.c | 16 +++------------- src/qemu/qemu_monitor.c | 12 ------------ src/qemu/qemu_monitor.h | 5 ----- src/qemu/qemu_monitor_json.c | 9 --------- src/qemu/qemu_monitor_json.h | 3 --- 5 files changed, 3 insertions(+), 42 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index b6d83f1dc6..806408115f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -9597,7 +9597,6 @@ qemuDomainBlockStatsGatherTotals(qemuBlockStats *data, * @driver: driver object * @vm: domain object * @path: to gather the statistics for - * @capacity: refresh capacity of the backing image * @retstats: returns pointer to structure holding the stats * * Gathers the block statistics for use in qemuDomainBlockStats* APIs. @@ -9607,7 +9606,6 @@ qemuDomainBlockStatsGatherTotals(qemuBlockStats *data, static int qemuDomainBlocksStatsGather(virDomainObj *vm, const char *path, - bool capacity, qemuBlockStats **retstats) { qemuDomainObjPrivate *priv = vm->privateData; @@ -9644,10 +9642,6 @@ qemuDomainBlocksStatsGather(virDomainObj *vm, qemuDomainObjEnterMonitor(vm); nstats = qemuMonitorGetAllBlockStatsInfo(priv->mon, &blockstats); - - if (capacity && nstats >= 0) - rc = qemuMonitorBlockStatsUpdateCapacityBlockdev(priv->mon, blockstats); - qemuDomainObjExitMonitor(vm); if (nstats < 0 || rc < 0) @@ -9713,7 +9707,7 @@ qemuDomainBlockStats(virDomainPtr dom, if (virDomainObjCheckActive(vm) < 0) goto endjob; - if (qemuDomainBlocksStatsGather(vm, path, false, &blockstats) < 0) + if (qemuDomainBlocksStatsGather(vm, path, &blockstats) < 0) goto endjob; if (VIR_ASSIGN_IS_OVERFLOW(stats->rd_req, blockstats->rd_req) || @@ -9769,8 +9763,7 @@ qemuDomainBlockStatsFlags(virDomainPtr dom, if (virDomainObjCheckActive(vm) < 0) goto endjob; - if ((nstats = qemuDomainBlocksStatsGather(vm, path, false, - &blockstats)) < 0) + if ((nstats = qemuDomainBlocksStatsGather(vm, path, &blockstats)) < 0) goto endjob; /* return count of supported stats */ @@ -10603,7 +10596,7 @@ qemuDomainGetBlockInfo(virDomainPtr dom, goto endjob; } - if (qemuDomainBlocksStatsGather(vm, path, true, &entry) < 0) + if (qemuDomainBlocksStatsGather(vm, path, &entry) < 0) goto endjob; if (!entry->wr_highest_offset_valid) { @@ -17724,9 +17717,6 @@ qemuDomainGetStatsBlock(virQEMUDriver *driver, rc = qemuMonitorGetAllBlockStatsInfo(priv->mon, &stats); - if (rc >= 0) - rc = qemuMonitorBlockStatsUpdateCapacityBlockdev(priv->mon, stats); - qemuDomainObjExitMonitor(dom); /* failure to retrieve stats is fine at this point */ diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index ce6220fbfb..f9b320f765 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2032,18 +2032,6 @@ qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, } -int -qemuMonitorBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, - GHashTable *stats) -{ - VIR_DEBUG("stats=%p", stats); - - QEMU_CHECK_MONITOR(mon); - - return qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(mon, stats); -} - - /** * qemuMonitorBlockGetNamedNodeData: * @mon: monitor object diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 4f94edb05f..0555bcbf8e 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -821,11 +821,6 @@ qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, GHashTable **ret_stats) ATTRIBUTE_NONNULL(2); -int -qemuMonitorBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, - GHashTable *stats) - ATTRIBUTE_NONNULL(2); - typedef struct _qemuBlockNamedNodeDataBitmap qemuBlockNamedNodeDataBitmap; struct _qemuBlockNamedNodeDataBitmap { char *name; diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 0aa74e226d..e00bc0cf1b 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2629,15 +2629,6 @@ qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, } -int -qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon G_GNUC_UNUSED, - GHashTable *stats G_GNUC_UNUSED) -{ - - return 0; -} - - static void qemuMonitorJSONBlockNamedNodeDataBitmapFree(qemuBlockNamedNodeDataBitmap *bitmap) { diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 5944aec917..8b06b7599e 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -94,9 +94,6 @@ qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, int qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, GHashTable *hash); -int -qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, - GHashTable *stats); GHashTable * qemuMonitorJSONBlockGetNamedNodeDataJSON(virJSONValue *nodes); -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> The 'limits' field reports various maximum request sizes and alignments for a qemu blockdev protocol node. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_monitor.c | 2 ++ src/qemu/qemu_monitor.h | 19 +++++++++++++++++++ src/qemu/qemu_monitor_json.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index f9b320f765..554898b93f 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1983,6 +1983,8 @@ qemuBlockStatsFinalize(GObject *object) if (!stats) return; + g_free(stats->limits); + G_OBJECT_CLASS(qemu_block_stats_parent_class)->finalize(object); } diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 0555bcbf8e..9b9292e48d 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -789,6 +789,23 @@ qemuMonitorBlockIOStatusToError(const char *status); GHashTable * qemuMonitorGetBlockInfo(qemuMonitor *mon); + +struct qemuBlockStatsLimits { + unsigned long long request_alignment; + unsigned long long discard_max; + unsigned long long discard_alignment; + unsigned long long write_zeroes_max; + unsigned long long write_zeroes_alignment; + unsigned long long transfer_optimal; + unsigned long long transfer_max; + unsigned long long transfer_hw_max; + unsigned long long iov_max; + unsigned long long iov_hw_max; + unsigned long long memory_alignment_minimal; + unsigned long long memory_alignment_optimal; +}; + + struct _qemuBlockStats { GObject parent; @@ -810,6 +827,8 @@ struct _qemuBlockStats { /* write_threshold is valid only if it's non-zero, conforming to qemu semantics */ unsigned long long write_threshold; + + struct qemuBlockStatsLimits *limits; }; G_DECLARE_FINAL_TYPE(qemuBlockStats, qemu_block_stats, QEMU, BLOCK_STATS, GObject); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index e00bc0cf1b..cf63f43318 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2524,6 +2524,33 @@ qemuMonitorJSONQueryBlockstats(qemuMonitor *mon, } +static struct qemuBlockStatsLimits * +qemuMonitorJSONBlockStatsCollectLimits(virJSONValue *limits_json) +{ + struct qemuBlockStatsLimits *limits = g_new0(struct qemuBlockStatsLimits, 1); + + virJSONValueObjectGetNumberUlong(limits_json, "request-alignment", &limits->request_alignment); + + virJSONValueObjectGetNumberUlong(limits_json, "max-discard", &limits->discard_max); + virJSONValueObjectGetNumberUlong(limits_json, "discard-alignment", &limits->discard_alignment); + + virJSONValueObjectGetNumberUlong(limits_json, "max-write-zeroes", &limits->write_zeroes_max); + virJSONValueObjectGetNumberUlong(limits_json, "write-zeroes-alignment", &limits->write_zeroes_alignment); + + virJSONValueObjectGetNumberUlong(limits_json, "opt-transfer", &limits->transfer_optimal); + virJSONValueObjectGetNumberUlong(limits_json, "max-transfer", &limits->transfer_max); + virJSONValueObjectGetNumberUlong(limits_json, "max-hw-transfer", &limits->transfer_hw_max); + + virJSONValueObjectGetNumberUlong(limits_json, "max-iov", &limits->iov_max); + virJSONValueObjectGetNumberUlong(limits_json, "max-hw-iov", &limits->iov_hw_max); + + virJSONValueObjectGetNumberUlong(limits_json, "min-mem-alignment", &limits->memory_alignment_minimal); + virJSONValueObjectGetNumberUlong(limits_json, "opt-mem-alignment", &limits->memory_alignment_optimal); + + return limits; +} + + static int qemuMonitorJSONGetOneBlockStatsNamedNodes(size_t pos G_GNUC_UNUSED, virJSONValue *val, @@ -2531,6 +2558,7 @@ qemuMonitorJSONGetOneBlockStatsNamedNodes(size_t pos G_GNUC_UNUSED, { GHashTable *stats = opaque; virJSONValue *image; + virJSONValue *limits; const char *nodename; qemuBlockStats *entry; @@ -2556,6 +2584,9 @@ qemuMonitorJSONGetOneBlockStatsNamedNodes(size_t pos G_GNUC_UNUSED, ignore_value(virJSONValueObjectGetNumberUlong(val, "write_threshold", &entry->write_threshold)); + if ((limits = virJSONValueObjectGetObject(image, "limits"))) + entry->limits = qemuMonitorJSONBlockStatsCollectLimits(limits); + return 1; /* we don't want to steal the value from the JSON array */ } -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> Management applications can use the detected limits to cross reference with configuration within the VM to ensure optimal performance. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- docs/manpages/virsh.rst | 21 +++++ include/libvirt/libvirt-domain.h | 148 +++++++++++++++++++++++++++++++ src/qemu/qemu_driver.c | 61 +++++++++++++ 3 files changed, 230 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index bcb5495ed9..5b4eb236a4 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2751,6 +2751,27 @@ Information listed includes: * ``block.<num>.physical`` - physical size of source file in bytes * ``block.<num>.threshold`` - threshold (in bytes) for delivering the VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD event. See domblkthreshold. +* ``block.<num>.limits.request_alignment`` - Alignment requirement for requests + in bytes +* ``block.<num>.limits.discard_max`` - Maximum number of bytes that can be + discarded at once +* ``block.<num>.limits.discard_alignment`` - Optimal alignment for discard + requests in bytes +* ``block.<num>.limits.write_zeroes_max`` - Maximum number of bytes that can be + zeroed out at once +* ``block.<num>.limits.write_zeroes_alignment`` - Optimal alignment for + write_zeroes requests in bytes +* ``block.<num>.limits.transfer_optimal`` - Optimal transfer length in bytes +* ``block.<num>.limits.transfer_max`` - Maximal transfer length in bytes +* ``block.<num>.limits.transfer_hw_max`` - Maximal hardware transfer length of + requests bypassing kernel IO scheduler in bytes +* ``block.<num>.limits.iov_max`` - Maximum number of scatter/gather elements +* ``block.<num>.limits.iov_hw_max`` - Maximal number of scatter/gather elements + of requests bypassing kernel IO scheduler +* ``block.<num>.limits.memory_alignment_minimal`` - memory alignment in bytes so + that no bounce buffer is needed +* ``block.<num>.limits.memory_alignment_optimal`` - memory alignment in bytes + that is used for bounce buffers *--iothread* returns information about IOThreads on the running guest diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 71bb49fe6c..90c37a575c 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -3488,6 +3488,154 @@ struct _virDomainStatsRecord { */ # define VIR_DOMAIN_STATS_BLOCK_SUFFIX_THRESHOLD ".threshold" +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_REQUEST_ALIGNMENT: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Alignment requirement, in bytes, for offset/length of I/O requests, as + * unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_REQUEST_ALIGNMENT ".limits.request_alignment" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_DISCARD_MAX: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Maximum number of bytes that can be discarded at once, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_DISCARD_MAX ".limits.discard_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_DISCARD_ALIGNMENT: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Optimal alignment for discard requests in bytes, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_DISCARD_ALIGNMENT ".limits.discard_alignment" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_WRITE_ZEROES_MAX: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Maximum number of bytes that can be zeroed out at once, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_WRITE_ZEROES_MAX ".limits.write_zeroes_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_WRITE_ZEROES_ALIGNMENT: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Optimal alignment for write_zeroes requests in bytes, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_WRITE_ZEROES_ALIGNMENT ".limits.write_zeroes_alignment" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_OPTIMAL: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Optimal transfer length in bytes, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_OPTIMAL ".limits.transfer_optimal" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_MAX: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Maximal transfer length in bytes, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_MAX ".limits.transfer_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_HW_MAX: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Maximal hardware transfer length of requests bypassing kernel IO scheduler + * in bytes, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_HW_MAX ".limits.transfer_hw_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_IOV_MAX: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Maximum number of scatter/gather elements, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_IOV_MAX ".limits.iov_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_IOV_HW_MAX: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Maximal number of scatter/gather elements of requests bypassing kernel IO + * scheduler, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_IOV_HW_MAX ".limits.iov_hw_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_MEMORY_ALIGNMENT_MINIMAL: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * memory alignment in bytes so that no bounce buffer is needed, as + * unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_MEMORY_ALIGNMENT_MINIMAL ".limits.memory_alignment_minimal" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_MEMORY_ALIGNMENT_OPTIMAL: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * memory alignment in bytes that is used for bounce buffers, as + * unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_MEMORY_ALIGNMENT_OPTIMAL ".limits.memory_alignment_optimal" /** * VIR_DOMAIN_STATS_PERF_CMT: diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 806408115f..4e5e2fed0f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17510,6 +17510,67 @@ qemuDomainGetStatsBlockExportBackendStorage(const char *entryname, if (entry->write_threshold) virTypedParamListAddULLong(params, entry->write_threshold, VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_THRESHOLD, recordnr); + + if (entry->limits) { + if (entry->limits->request_alignment > 0) + virTypedParamListAddULLong(params, entry->limits->request_alignment, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_REQUEST_ALIGNMENT, + recordnr); + + if (entry->limits->discard_max > 0) + virTypedParamListAddULLong(params, entry->limits->discard_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_DISCARD_MAX, + recordnr); + + if (entry->limits->discard_alignment > 0) + virTypedParamListAddULLong(params, entry->limits->discard_alignment, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_DISCARD_ALIGNMENT, + recordnr); + + if (entry->limits->write_zeroes_max > 0) + virTypedParamListAddULLong(params, entry->limits->write_zeroes_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_WRITE_ZEROES_MAX, + recordnr); + if (entry->limits->write_zeroes_alignment > 0) + virTypedParamListAddULLong(params, entry->limits->write_zeroes_alignment, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_WRITE_ZEROES_ALIGNMENT, + recordnr); + + if (entry->limits->transfer_optimal > 0) + virTypedParamListAddULLong(params, entry->limits->transfer_optimal, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_OPTIMAL, + recordnr); + + if (entry->limits->transfer_max > 0) + virTypedParamListAddULLong(params, entry->limits->transfer_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_MAX, + recordnr); + + if (entry->limits->transfer_hw_max > 0) + virTypedParamListAddULLong(params, entry->limits->transfer_hw_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_HW_MAX, + recordnr); + + if (entry->limits->iov_max > 0) + virTypedParamListAddULLong(params, entry->limits->iov_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_IOV_MAX, + recordnr); + + if (entry->limits->iov_hw_max > 0) + virTypedParamListAddULLong(params, entry->limits->iov_hw_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_IOV_HW_MAX, + recordnr); + + if (entry->limits->memory_alignment_minimal > 0) + virTypedParamListAddULLong(params, entry->limits->memory_alignment_minimal, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_MEMORY_ALIGNMENT_MINIMAL, + recordnr); + + if (entry->limits->memory_alignment_optimal > 0) + virTypedParamListAddULLong(params, entry->limits->memory_alignment_optimal, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_MEMORY_ALIGNMENT_OPTIMAL, + recordnr); + } } -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> The 'timed_stats' block is a set of statistics gathered in configurable time intervals. The stats include latency timings of reads/writes as well as the depth of the request queues. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_monitor.c | 1 + src/qemu/qemu_monitor.h | 29 ++++++++++++++++++++++++ src/qemu/qemu_monitor_json.c | 44 ++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 554898b93f..fb01335f89 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1984,6 +1984,7 @@ qemuBlockStatsFinalize(GObject *object) return; g_free(stats->limits); + g_free(stats->timed_stats); G_OBJECT_CLASS(qemu_block_stats_parent_class)->finalize(object); } diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 9b9292e48d..a93d722418 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -806,6 +806,31 @@ struct qemuBlockStatsLimits { }; +struct qemuBlockStatsTimed { + unsigned long long interval_length; + + /* latencies are in nanoseconds */ + unsigned long long rd_latency_min; + unsigned long long rd_latency_max; + unsigned long long rd_latency_avg; + + unsigned long long wr_latency_min; + unsigned long long wr_latency_max; + unsigned long long wr_latency_avg; + + unsigned long long zone_append_latency_min; + unsigned long long zone_append_latency_max; + unsigned long long zone_append_latency_avg; + + unsigned long long flush_latency_min; + unsigned long long flush_latency_max; + unsigned long long flush_latency_avg; + + double rd_queue_depth_avg; + double wr_queue_depth_avg; + double zone_append_queue_depth_avg; +}; + struct _qemuBlockStats { GObject parent; @@ -829,6 +854,10 @@ struct _qemuBlockStats { unsigned long long write_threshold; struct qemuBlockStatsLimits *limits; + + /* block accounting/timed stats from qemu - one entry per interval configured */ + size_t n_timed_stats; + struct qemuBlockStatsTimed *timed_stats; }; G_DECLARE_FINAL_TYPE(qemuBlockStats, qemu_block_stats, QEMU, BLOCK_STATS, GObject); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index cf63f43318..0cb20d4387 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2386,6 +2386,45 @@ qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, } +static void +qemuMonitorJSONBlockStatsCollectDataTimedOne(virJSONValue *j, + struct qemuBlockStatsTimed *s) +{ + virJSONValueObjectGetNumberUlong(j, "interval_length", &s->interval_length); + + virJSONValueObjectGetNumberUlong(j, "min_rd_latency_ns", &s->rd_latency_min); + virJSONValueObjectGetNumberUlong(j, "max_rd_latency_ns", &s->rd_latency_max); + virJSONValueObjectGetNumberUlong(j, "avg_rd_latency_ns", &s->rd_latency_avg); + + virJSONValueObjectGetNumberUlong(j, "min_wr_latency_ns", &s->wr_latency_min); + virJSONValueObjectGetNumberUlong(j, "max_wr_latency_ns", &s->wr_latency_max); + virJSONValueObjectGetNumberUlong(j, "avg_wr_latency_ns", &s->wr_latency_avg); + + virJSONValueObjectGetNumberUlong(j, "min_zone_append_latency_ns", &s->zone_append_latency_min); + virJSONValueObjectGetNumberUlong(j, "max_zone_append_latency_ns", &s->zone_append_latency_max); + virJSONValueObjectGetNumberUlong(j, "avg_zone_append_latency_ns", &s->zone_append_latency_avg); + + virJSONValueObjectGetNumberDouble(j, "avg_rd_queue_depth", &s->rd_queue_depth_avg); + virJSONValueObjectGetNumberDouble(j, "avg_wr_queue_depth", &s->wr_queue_depth_avg); + virJSONValueObjectGetNumberDouble(j, "avg_zone_append_queue_depth", &s->zone_append_queue_depth_avg); +} + + +static void +qemuMonitorJSONBlockStatsCollectDataTimed(virJSONValue *timed_stats, + qemuBlockStats *bstats) +{ + size_t i; + + bstats->n_timed_stats = virJSONValueArraySize(timed_stats); + bstats->timed_stats = g_new0(struct qemuBlockStatsTimed, bstats->n_timed_stats); + + for (i = 0; i < bstats->n_timed_stats; i++) + qemuMonitorJSONBlockStatsCollectDataTimedOne(virJSONValueArrayGet(timed_stats, i), + bstats->timed_stats + i); +} + + static qemuBlockStats * qemuMonitorJSONBlockStatsCollectData(virJSONValue *dev, int *nstats) @@ -2394,6 +2433,7 @@ qemuMonitorJSONBlockStatsCollectData(virJSONValue *dev, virJSONValue *parent; virJSONValue *parentstats; virJSONValue *stats; + virJSONValue *timed_stats; if ((stats = virJSONValueObjectGetObject(dev, "stats")) == NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", @@ -2429,6 +2469,10 @@ qemuMonitorJSONBlockStatsCollectData(virJSONValue *dev, bstats->wr_highest_offset_valid = true; } + if ((timed_stats = virJSONValueObjectGetArray(stats, "timed_stats")) && + virJSONValueArraySize(timed_stats) > 0) + qemuMonitorJSONBlockStatsCollectDataTimed(timed_stats, bstats); + return g_steal_pointer(&bstats); } -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> The statistics show various disk access timing parameters collected in configurable interval which can be useful for performance investigations. Note that the statistic collection needs to be enabled explicitly for the statistics to be collected and displayed. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- docs/manpages/virsh.rst | 33 ++++++ include/libvirt/libvirt-domain.h | 178 +++++++++++++++++++++++++++++++ src/qemu/qemu_driver.c | 94 ++++++++++++++++ 3 files changed, 305 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 5b4eb236a4..73263ffc7f 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2772,6 +2772,39 @@ Information listed includes: that no bounce buffer is needed * ``block.<num>.limits.memory_alignment_optimal`` - memory alignment in bytes that is used for bounce buffers +* ``block.<num>.timed_group.count`` - number of blocks of timed group statistics +* ``block.<num>.timed_group.<num>.interval_length`` - The time interval in + seconds for which the statistics in this group were collected. +* ``block.<num>.timed_group.<num>.rd_latency_min`` - minimum latency of read + operations in the defined interval in nanoseconds +* ``block.<num>.timed_group.<num>.rd_latency_max`` - maximum latency of read + operations in the defined interval in nanoseconds +* ``block.<num>.timed_group.<num>.rd_latency_avg`` - average latency of read + operations in the defined interval in nanoseconds +* ``block.<num>.timed_group.<num>.wr_latency_min`` - minimum latency of write + operations in the defined interval in nanoseconds +* ``block.<num>.timed_group.<num>.wr_latency_max`` - maximum latency of write + operations in the defined interval in nanoseconds +* ``block.<num>.timed_group.<num>.wr_latency_avg`` - average latency of write + operations in the defined interval in nanoseconds +* ``block.<num>.timed_group.<num>.zone_append_latency_min`` - minimum latency + of zone append operations in the defined interval in nanoseconds +* ``block.<num>.timed_group.<num>.zone_append_latency_max`` - maximum latency + of zone append operations in the defined interval in nanoseconds +* ``block.<num>.timed_group.<num>.zone_append_latency_avg`` - average latency + of zone append operations in the defined interval in nanoseconds +* ``block.<num>.timed_group.<num>.flush_latency_min`` - minimum latency + of flush operations in the defined interval in nanoseconds +* ``block.<num>.timed_group.<num>.flush_latency_max`` - maximum latency of flush + operations in the defined interval in nanoseconds +* ``block.<num>.timed_group.<num>.flush_latency_avg`` - average latency of flush + operations in the defined interval in nanoseconds +* ``block.<num>.timed_group.<num>.rd_queue_depth_avg`` - average number of + pending read operations in the defined interval +* ``block.<num>.timed_group.<num>.wr_queue_depth_avg`` - average number of + pending write operations in the defined interval +* ``block.<num>.timed_group.<num>.zone_append_queue_depth_avg`` - average number + of pending zone append operations in the defined interval *--iothread* returns information about IOThreads on the running guest diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 90c37a575c..56bd085ef5 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -3637,6 +3637,184 @@ struct _virDomainStatsRecord { */ # define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_MEMORY_ALIGNMENT_OPTIMAL ".limits.memory_alignment_optimal" +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_COUNT: + * + * Number of groups of statistics accounted in a configured time intervals as + * unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_COUNT ".timed_group.count" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX: + * + * The parameter name prefix to access each group of timed stats. Concatenate the + * prefix, the entry number formatted as an unsigned integer and one of the + * timed group suffix parameters to form a complete paramter name. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX ".timed_group." + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_INTERVAL: + * + * The time interval in seconds as unsigned long long for which the statistics + * in this group were collected. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_INTERVAL ".interval" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_MIN: + * + * Minimum latency of read operations in the defined interval, in nanoseconds as + * unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_MIN ".rd_latency_min" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_MAX: + * + * Maximum latency of read operations in the defined interval, in nanoseconds as + * unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_MAX ".rd_latency_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_AVG: + * + * Average latency of read operations in the defined interval, in nanoseconds as + * unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_AVG ".rd_latency_avg" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_MIN: + * + * Minimum latency of write operations in the defined interval, in nanoseconds + * as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_MIN ".wr_latency_min" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_MAX: + * + * Maximum latency of write operations in the defined interval, in nanoseconds + * as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_MAX ".wr_latency_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_AVG: + * + * Average latency of write operations in the defined interval, in nanoseconds + * as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_AVG ".wr_latency_avg" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATENCY_MIN: + * Minimum latency of zone append operations in the defined interval, in + * nanoseconds as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATENCY_MIN ".zone_append_latency_min" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATENCY_MAX: + * + * Maximum latency of zone append operations in the defined interval, in + * nanoseconds as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATENCY_MAX ".zone_append_latency_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATENCY_AVG: + * + * Average latency of zone append operations in the defined interval, in + * nanoseconds as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATENCY_AVG ".zone_append_latency_avg" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_MIN: + * + * Minimum latency of flush operations in the defined interval, in nanoseconds + * as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_MIN ".flush_latency_min" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_MAX: + * + * Maximum latency of flush operations in the defined interval, in nanoseconds + * as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_MAX ".flush_latency_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_AVG: + * + * Average latency of flush operations in the defined interval, in nanoseconds + * as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_AVG ".flush_latency_avg" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_QUEUE_DEPTH_AVG: + * + * Average number of pending read operations in the defined interval as double. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_QUEUE_DEPTH_AVG ".rd_queue_depth_avg" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_QUEUE_DEPTH_AVG: + * + * Average number of pending write operations in the defined interval as double. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_QUEUE_DEPTH_AVG ".wr_queue_depth_avg" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_QUEUE_DEPTH_AVG: + * + * Average number of pending zone append operations in the defined interval as + * double. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_QUEUE_DEPTH_AVG ".zone_append_queue_depth_avg" + /** * VIR_DOMAIN_STATS_PERF_CMT: * diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 4e5e2fed0f..b8157bd3fe 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17581,6 +17581,7 @@ qemuDomainGetStatsBlockExportFrontend(const char *frontendname, virTypedParamList *par) { qemuBlockStats *en; + size_t i; /* In case where qemu didn't provide the stats we stop here rather than * trying to refresh the stats from the disk. Inability to provide stats is @@ -17604,6 +17605,99 @@ qemuDomainGetStatsBlockExportFrontend(const char *frontendname, VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_FL_REQS, idx); virTypedParamListAddULLong(par, en->flush_total_times, VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_FL_TIMES, idx); + + if (en->n_timed_stats > 0) { + virTypedParamListAddULLong(par, en->n_timed_stats, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_COUNT, idx); + + for (i = 0; i < en->n_timed_stats; i++) { + virTypedParamListAddULLong(par, en->timed_stats[i].interval_length, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_INTERVAL, + idx, i); + + virTypedParamListAddULLong(par, en->timed_stats[i].rd_latency_min, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_MIN, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].rd_latency_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_MAX, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].rd_latency_avg, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_AVG, + idx, i); + + virTypedParamListAddULLong(par, en->timed_stats[i].wr_latency_min, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_MIN, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].wr_latency_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_MAX, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].wr_latency_avg, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_AVG, + idx, i); + + virTypedParamListAddULLong(par, en->timed_stats[i].zone_append_latency_min, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATENCY_MIN, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].zone_append_latency_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATENCY_MAX, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].zone_append_latency_avg, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATENCY_AVG, + idx, i); + + virTypedParamListAddULLong(par, en->timed_stats[i].flush_latency_min, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_MIN, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].flush_latency_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_MAX, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].flush_latency_avg, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_AVG, + idx, i); + + virTypedParamListAddDouble(par, en->timed_stats[i].rd_queue_depth_avg, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_QUEUE_DEPTH_AVG, + idx, i); + virTypedParamListAddDouble(par, en->timed_stats[i].wr_queue_depth_avg, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_QUEUE_DEPTH_AVG, + idx, i); + virTypedParamListAddDouble(par, en->timed_stats[i].zone_append_queue_depth_avg, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_QUEUE_DEPTH_AVG, + idx, i); + } + } } -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> --- .../caps_10.2.0_x86_64.replies | 1373 +++++++++-------- .../caps_10.2.0_x86_64.xml | 2 +- 2 files changed, 731 insertions(+), 644 deletions(-) diff --git a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.replies index 677d4f2964..56ee2b8151 100644 --- a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.replies @@ -20,7 +20,7 @@ "minor": 1, "major": 10 }, - "package": "v10.1.0-1060-geb7abb4a71" + "package": "v10.1.0-1063-g3bf55b83ef" }, "id": "libvirt-2" } @@ -10539,10 +10539,15 @@ "type": "[81]" }, { - "name": "format-specific", + "name": "limits", "default": null, "type": "593" }, + { + "name": "format-specific", + "default": null, + "type": "594" + }, { "name": "backing-image", "default": null, @@ -10624,7 +10629,7 @@ }, { "name": "type", - "type": "594" + "type": "595" }, { "name": "name", @@ -10655,11 +10660,11 @@ }, { "name": "perm", - "type": "[595]" + "type": "[596]" }, { "name": "shared-perm", - "type": "[595]" + "type": "[596]" } ], "meta-type": "object" @@ -10943,7 +10948,7 @@ "members": [ { "name": "image", - "type": "596" + "type": "597" }, { "name": "config", @@ -10983,22 +10988,22 @@ { "name": "inject-error", "default": null, - "type": "[597]" + "type": "[598]" }, { "name": "set-state", "default": null, - "type": "[598]" + "type": "[599]" }, { "name": "take-child-perms", "default": null, - "type": "[595]" + "type": "[596]" }, { "name": "unshare-child-perms", "default": null, - "type": "[595]" + "type": "[596]" } ], "meta-type": "object" @@ -11008,11 +11013,11 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "log", - "type": "596" + "type": "597" }, { "name": "log-sector-size", @@ -11037,11 +11042,11 @@ "members": [ { "name": "test", - "type": "596" + "type": "597" }, { "name": "raw", - "type": "596" + "type": "597" } ], "meta-type": "object" @@ -11051,7 +11056,7 @@ "members": [ { "name": "image", - "type": "596" + "type": "597" } ], "meta-type": "object" @@ -11061,7 +11066,7 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" } ], "meta-type": "object" @@ -11071,11 +11076,11 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "target", - "type": "596" + "type": "597" }, { "name": "bitmap", @@ -11105,7 +11110,7 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "bottom", @@ -11130,12 +11135,12 @@ { "name": "locking", "default": null, - "type": "599" + "type": "600" }, { "name": "aio", "default": null, - "type": "600" + "type": "601" }, { "name": "aio-max-batch", @@ -11394,7 +11399,7 @@ "members": [ { "name": "transport", - "type": "601" + "type": "602" }, { "name": "portal", @@ -11427,7 +11432,7 @@ { "name": "header-digest", "default": null, - "type": "602" + "type": "603" }, { "name": "timeout", @@ -11442,7 +11447,7 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "key-secret", @@ -11452,7 +11457,7 @@ { "name": "header", "default": null, - "type": "596" + "type": "597" } ], "meta-type": "object" @@ -11505,7 +11510,7 @@ "members": [ { "name": "server", - "type": "603" + "type": "604" }, { "name": "path", @@ -11594,7 +11599,7 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "prealloc-align", @@ -11614,12 +11619,12 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "backing", "default": null, - "type": "604" + "type": "605" }, { "name": "lazy-refcounts", @@ -11649,7 +11654,7 @@ { "name": "overlap-check", "default": null, - "type": "605" + "type": "606" }, { "name": "cache-size", @@ -11679,12 +11684,12 @@ { "name": "encrypt", "default": null, - "type": "606" + "type": "607" }, { "name": "data-file", "default": null, - "type": "596" + "type": "597" } ], "meta-type": "object" @@ -11694,17 +11699,17 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "backing", "default": null, - "type": "604" + "type": "605" }, { "name": "encrypt", "default": null, - "type": "607" + "type": "608" } ], "meta-type": "object" @@ -11714,12 +11719,12 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "backing", "default": null, - "type": "604" + "type": "605" } ], "meta-type": "object" @@ -11734,7 +11739,7 @@ }, { "name": "children", - "type": "[596]" + "type": "[597]" }, { "name": "vote-threshold", @@ -11748,7 +11753,7 @@ { "name": "read-pattern", "default": null, - "type": "608" + "type": "609" } ], "meta-type": "object" @@ -11758,7 +11763,7 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "offset", @@ -11802,7 +11807,7 @@ { "name": "encrypt", "default": null, - "type": "609" + "type": "610" }, { "name": "user", @@ -11812,7 +11817,7 @@ { "name": "auth-client-required", "default": null, - "type": "[610]" + "type": "[611]" }, { "name": "key-secret", @@ -11822,7 +11827,7 @@ { "name": "server", "default": null, - "type": "[611]" + "type": "[612]" } ], "meta-type": "object" @@ -11832,11 +11837,11 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "mode", - "type": "612" + "type": "613" }, { "name": "top-id", @@ -11851,7 +11856,7 @@ "members": [ { "name": "server", - "type": "613" + "type": "614" }, { "name": "path", @@ -11865,7 +11870,7 @@ { "name": "host-key-check", "default": null, - "type": "614" + "type": "615" } ], "meta-type": "object" @@ -11879,7 +11884,7 @@ }, { "name": "file", - "type": "596" + "type": "597" } ], "meta-type": "object" @@ -11958,59 +11963,59 @@ "variants": [ { "case": "file", - "type": "615" + "type": "616" }, { "case": "gluster", - "type": "616" + "type": "617" }, { "case": "luks", - "type": "617" + "type": "618" }, { "case": "nfs", - "type": "618" + "type": "619" }, { "case": "parallels", - "type": "619" + "type": "620" }, { "case": "qcow", - "type": "620" + "type": "621" }, { "case": "qcow2", - "type": "621" + "type": "622" }, { "case": "qed", - "type": "622" + "type": "623" }, { "case": "rbd", - "type": "623" + "type": "624" }, { "case": "ssh", - "type": "624" + "type": "625" }, { "case": "vdi", - "type": "625" + "type": "626" }, { "case": "vhdx", - "type": "626" + "type": "627" }, { "case": "vmdk", - "type": "627" + "type": "628" }, { "case": "vpc", - "type": "628" + "type": "629" }, { "case": "blkdebug", @@ -12159,11 +12164,11 @@ "variants": [ { "case": "luks", - "type": "629" + "type": "630" }, { "case": "qcow2", - "type": "630" + "type": "631" }, { "case": "blkdebug", @@ -12428,25 +12433,25 @@ "variants": [ { "case": "inet", - "type": "632" + "type": "633" }, { "case": "unix", - "type": "633" + "type": "634" }, { "case": "vsock", - "type": "634" + "type": "635" }, { "case": "fd", - "type": "635" + "type": "636" } ], "members": [ { "name": "type", - "type": "631" + "type": "632" } ], "meta-type": "object" @@ -12552,7 +12557,7 @@ { "name": "allow-other", "default": null, - "type": "636" + "type": "637" } ], "meta-type": "object" @@ -12609,97 +12614,97 @@ "variants": [ { "case": "file", - "type": "638" + "type": "639" }, { "case": "serial", - "type": "639" + "type": "640" }, { "case": "parallel", - "type": "639" + "type": "640" }, { "case": "pipe", - "type": "639" + "type": "640" }, { "case": "socket", - "type": "640" + "type": "641" }, { "case": "udp", - "type": "641" + "type": "642" }, { "case": "pty", - "type": "642" + "type": "643" }, { "case": "null", - "type": "643" + "type": "644" }, { "case": "mux", - "type": "644" + "type": "645" }, { "case": "hub", - "type": "645" + "type": "646" }, { "case": "msmouse", - "type": "643" + "type": "644" }, { "case": "wctablet", - "type": "643" + "type": "644" }, { "case": "braille", - "type": "643" + "type": "644" }, { "case": "testdev", - "type": "643" + "type": "644" }, { "case": "stdio", - "type": "646" + "type": "647" }, { "case": "spicevmc", - "type": "647" + "type": "648" }, { "case": "spiceport", - "type": "648" + "type": "649" }, { "case": "qemu-vdagent", - "type": "649" + "type": "650" }, { "case": "dbus", - "type": "650" + "type": "651" }, { "case": "vc", - "type": "651" + "type": "652" }, { "case": "ringbuf", - "type": "652" + "type": "653" }, { "case": "memory", - "type": "652" + "type": "653" } ], "members": [ { "name": "type", - "type": "637" + "type": "638" } ], "meta-type": "object" @@ -12943,7 +12948,7 @@ { "name": "search", "default": null, - "type": "[653]" + "type": "[654]" }, { "name": "fqdn", @@ -13033,17 +13038,17 @@ { "name": "tcp-ports", "default": null, - "type": "[653]" + "type": "[654]" }, { "name": "udp-ports", "default": null, - "type": "[653]" + "type": "[654]" }, { "name": "param", "default": null, - "type": "[653]" + "type": "[654]" } ], "meta-type": "object" @@ -13109,7 +13114,7 @@ { "name": "dnssearch", "default": null, - "type": "[653]" + "type": "[654]" }, { "name": "domainname", @@ -13149,12 +13154,12 @@ { "name": "hostfwd", "default": null, - "type": "[653]" + "type": "[654]" }, { "name": "guestfwd", "default": null, - "type": "[653]" + "type": "[654]" }, { "name": "tftp-server-name", @@ -13550,25 +13555,25 @@ "variants": [ { "case": "inet", - "type": "613" + "type": "614" }, { "case": "unix", - "type": "655" + "type": "656" }, { "case": "vsock", - "type": "656" + "type": "657" }, { "case": "fd", - "type": "657" + "type": "658" } ], "members": [ { "name": "type", - "type": "631" + "type": "632" } ], "meta-type": "object" @@ -13759,11 +13764,11 @@ "variants": [ { "case": "passthrough", - "type": "658" + "type": "659" }, { "case": "emulator", - "type": "659" + "type": "660" } ], "members": [ @@ -14197,17 +14202,17 @@ "variants": [ { "case": "number", - "type": "661" + "type": "662" }, { "case": "qcode", - "type": "662" + "type": "663" } ], "members": [ { "name": "type", - "type": "660" + "type": "661" } ], "meta-type": "object" @@ -14223,29 +14228,29 @@ "variants": [ { "case": "key", - "type": "664" + "type": "665" }, { "case": "btn", - "type": "665" + "type": "666" }, { "case": "rel", - "type": "666" + "type": "667" }, { "case": "abs", - "type": "666" + "type": "667" }, { "case": "mtt", - "type": "667" + "type": "668" } ], "members": [ { "name": "type", - "type": "663" + "type": "664" } ], "meta-type": "object" @@ -14435,7 +14440,7 @@ { "name": "grab-mod", "default": null, - "type": "668" + "type": "669" } ], "meta-type": "object" @@ -14820,7 +14825,7 @@ }, { "name": "bitmaps", - "type": "[669]" + "type": "[670]" } ], "meta-type": "object" @@ -14923,11 +14928,11 @@ "members": [ { "name": "channel-type", - "type": "670" + "type": "671" }, { "name": "addr", - "type": "671" + "type": "672" } ], "meta-type": "object" @@ -15018,57 +15023,57 @@ "variants": [ { "case": "abort", - "type": "673" + "type": "674" }, { "case": "block-dirty-bitmap-add", - "type": "674" + "type": "675" }, { "case": "block-dirty-bitmap-remove", - "type": "675" + "type": "676" }, { "case": "block-dirty-bitmap-clear", - "type": "675" + "type": "676" }, { "case": "block-dirty-bitmap-enable", - "type": "675" + "type": "676" }, { "case": "block-dirty-bitmap-disable", - "type": "675" + "type": "676" }, { "case": "block-dirty-bitmap-merge", - "type": "676" + "type": "677" }, { "case": "blockdev-backup", - "type": "677" + "type": "678" }, { "case": "blockdev-snapshot", - "type": "678" + "type": "679" }, { "case": "blockdev-snapshot-internal-sync", - "type": "679" + "type": "680" }, { "case": "blockdev-snapshot-sync", - "type": "680" + "type": "681" }, { "case": "drive-backup", - "type": "681" + "type": "682" } ], "members": [ { "name": "type", - "type": "672" + "type": "673" } ], "meta-type": "object" @@ -15079,7 +15084,7 @@ { "name": "completion-mode", "default": null, - "type": "682" + "type": "683" } ], "meta-type": "object" @@ -15180,7 +15185,7 @@ "members": [ { "name": "json-type", - "type": "683" + "type": "684" } ], "meta-type": "object" @@ -15190,7 +15195,7 @@ "members": [ { "name": "members", - "type": "[684]" + "type": "[685]" }, { "name": "values", @@ -15217,7 +15222,7 @@ "members": [ { "name": "members", - "type": "[685]" + "type": "[686]" }, { "name": "tag", @@ -15227,7 +15232,7 @@ { "name": "variants", "default": null, - "type": "[686]" + "type": "[687]" } ], "meta-type": "object" @@ -15237,7 +15242,7 @@ "members": [ { "name": "members", - "type": "[687]" + "type": "[688]" } ], "meta-type": "object" @@ -15543,12 +15548,12 @@ { "name": "policy", "default": null, - "type": "688" + "type": "689" }, { "name": "rules", "default": null, - "type": "[689]" + "type": "[690]" } ], "meta-type": "object" @@ -15720,7 +15725,7 @@ { "name": "queue", "default": null, - "type": "690" + "type": "691" }, { "name": "status", @@ -15735,7 +15740,7 @@ { "name": "insert", "default": null, - "type": "691" + "type": "692" }, { "name": "interval", @@ -15754,7 +15759,7 @@ { "name": "queue", "default": null, - "type": "690" + "type": "691" }, { "name": "status", @@ -15769,7 +15774,7 @@ { "name": "insert", "default": null, - "type": "691" + "type": "692" }, { "name": "file", @@ -15793,7 +15798,7 @@ { "name": "queue", "default": null, - "type": "690" + "type": "691" }, { "name": "status", @@ -15808,7 +15813,7 @@ { "name": "insert", "default": null, - "type": "691" + "type": "692" }, { "name": "outdev", @@ -15832,7 +15837,7 @@ { "name": "queue", "default": null, - "type": "690" + "type": "691" }, { "name": "status", @@ -15847,7 +15852,7 @@ { "name": "insert", "default": null, - "type": "691" + "type": "692" }, { "name": "indev", @@ -15877,7 +15882,7 @@ { "name": "queue", "default": null, - "type": "690" + "type": "691" }, { "name": "status", @@ -15892,7 +15897,7 @@ { "name": "insert", "default": null, - "type": "691" + "type": "692" } ], "meta-type": "object" @@ -15907,7 +15912,7 @@ { "name": "queue", "default": null, - "type": "690" + "type": "691" }, { "name": "status", @@ -15922,7 +15927,7 @@ { "name": "insert", "default": null, - "type": "691" + "type": "692" }, { "name": "vnet_hdr_support", @@ -15992,7 +15997,7 @@ { "name": "grab-toggle", "default": null, - "type": "692" + "type": "693" } ], "meta-type": "object" @@ -16214,7 +16219,7 @@ { "name": "rom", "default": null, - "type": "599" + "type": "600" } ], "meta-type": "object" @@ -16496,7 +16501,7 @@ { "name": "format", "default": null, - "type": "693" + "type": "694" }, { "name": "keyid", @@ -16527,7 +16532,7 @@ { "name": "format", "default": null, - "type": "693" + "type": "694" }, { "name": "keyid", @@ -16591,7 +16596,7 @@ { "name": "legacy-vm-type", "default": null, - "type": "599" + "type": "600" } ], "meta-type": "object" @@ -16714,7 +16719,7 @@ { "name": "limits", "default": null, - "type": "694" + "type": "695" }, { "name": "x-iops-total", @@ -16887,7 +16892,7 @@ { "name": "endpoint", "default": null, - "type": "695" + "type": "696" }, { "name": "priority", @@ -16913,7 +16918,7 @@ { "name": "endpoint", "default": null, - "type": "695" + "type": "696" }, { "name": "priority", @@ -16944,7 +16949,7 @@ { "name": "endpoint", "default": null, - "type": "695" + "type": "696" }, { "name": "priority", @@ -16980,7 +16985,7 @@ { "name": "endpoint", "default": null, - "type": "695" + "type": "696" }, { "name": "priority", @@ -17198,7 +17203,7 @@ "members": [ { "name": "cpu-state", - "type": "696" + "type": "697" }, { "name": "dedicated", @@ -17401,11 +17406,11 @@ }, { "name": "hierarchy", - "type": "697" + "type": "698" }, { "name": "data-type", - "type": "698" + "type": "699" }, { "name": "latency", @@ -17437,11 +17442,11 @@ }, { "name": "associativity", - "type": "699" + "type": "700" }, { "name": "policy", - "type": "700" + "type": "701" }, { "name": "line", @@ -17487,7 +17492,7 @@ "members": [ { "name": "data", - "type": "701" + "type": "702" } ], "meta-type": "object" @@ -17497,7 +17502,7 @@ "members": [ { "name": "data", - "type": "702" + "type": "703" } ], "meta-type": "object" @@ -17507,7 +17512,7 @@ "members": [ { "name": "data", - "type": "703" + "type": "704" } ], "meta-type": "object" @@ -17517,7 +17522,7 @@ "members": [ { "name": "data", - "type": "704" + "type": "705" } ], "meta-type": "object" @@ -17527,7 +17532,7 @@ "members": [ { "name": "data", - "type": "705" + "type": "706" } ], "meta-type": "object" @@ -17721,7 +17726,7 @@ }, { "name": "type", - "type": "706" + "type": "707" }, { "name": "help", @@ -17905,12 +17910,12 @@ { "name": "in", "default": null, - "type": "707" + "type": "708" }, { "name": "out", "default": null, - "type": "707" + "type": "708" } ], "meta-type": "object" @@ -17921,12 +17926,12 @@ { "name": "in", "default": null, - "type": "708" + "type": "709" }, { "name": "out", "default": null, - "type": "708" + "type": "709" }, { "name": "threshold", @@ -17942,12 +17947,12 @@ { "name": "in", "default": null, - "type": "709" + "type": "710" }, { "name": "out", "default": null, - "type": "709" + "type": "710" } ], "meta-type": "object" @@ -17958,12 +17963,12 @@ { "name": "in", "default": null, - "type": "707" + "type": "708" }, { "name": "out", "default": null, - "type": "707" + "type": "708" }, { "name": "nsamples", @@ -17979,12 +17984,12 @@ { "name": "in", "default": null, - "type": "707" + "type": "708" }, { "name": "out", "default": null, - "type": "707" + "type": "708" }, { "name": "latency", @@ -18000,12 +18005,12 @@ { "name": "in", "default": null, - "type": "710" + "type": "711" }, { "name": "out", "default": null, - "type": "710" + "type": "711" } ], "meta-type": "object" @@ -18016,12 +18021,12 @@ { "name": "in", "default": null, - "type": "711" + "type": "712" }, { "name": "out", "default": null, - "type": "711" + "type": "712" }, { "name": "try-mmap", @@ -18047,12 +18052,12 @@ { "name": "in", "default": null, - "type": "712" + "type": "713" }, { "name": "out", "default": null, - "type": "712" + "type": "713" }, { "name": "server", @@ -18068,12 +18073,12 @@ { "name": "in", "default": null, - "type": "713" + "type": "714" }, { "name": "out", "default": null, - "type": "713" + "type": "714" } ], "meta-type": "object" @@ -18084,12 +18089,12 @@ { "name": "in", "default": null, - "type": "714" + "type": "715" }, { "name": "out", "default": null, - "type": "714" + "type": "715" } ], "meta-type": "object" @@ -18100,12 +18105,12 @@ { "name": "in", "default": null, - "type": "707" + "type": "708" }, { "name": "out", "default": null, - "type": "707" + "type": "708" }, { "name": "dev", @@ -18126,12 +18131,12 @@ { "name": "in", "default": null, - "type": "707" + "type": "708" }, { "name": "out", "default": null, - "type": "707" + "type": "708" }, { "name": "path", @@ -18179,11 +18184,11 @@ }, { "name": "class_info", - "type": "715" + "type": "716" }, { "name": "id", - "type": "716" + "type": "717" }, { "name": "irq", @@ -18201,11 +18206,11 @@ { "name": "pci_bridge", "default": null, - "type": "717" + "type": "718" }, { "name": "regions", - "type": "[718]" + "type": "[719]" } ], "meta-type": "object" @@ -18291,7 +18296,7 @@ }, { "name": "value", - "type": "719" + "type": "720" } ], "meta-type": "object" @@ -18310,12 +18315,12 @@ }, { "name": "type", - "type": "720" + "type": "721" }, { "name": "unit", "default": null, - "type": "721" + "type": "722" }, { "name": "base", @@ -18407,7 +18412,7 @@ }, { "name": "protocol-features", - "type": "722" + "type": "723" }, { "name": "max-queues", @@ -18566,7 +18571,7 @@ }, { "name": "type", - "type": "723" + "type": "724" } ], "meta-type": "object" @@ -18605,7 +18610,7 @@ "members": [ { "name": "type", - "type": "724" + "type": "725" }, { "name": "header", @@ -18772,7 +18777,7 @@ }, { "name": "reason", - "type": "725" + "type": "726" } ], "meta-type": "object" @@ -18928,39 +18933,101 @@ }, { "name": "593", + "members": [ + { + "name": "request-alignment", + "type": "int" + }, + { + "name": "max-discard", + "default": null, + "type": "int" + }, + { + "name": "discard-alignment", + "default": null, + "type": "int" + }, + { + "name": "max-write-zeroes", + "default": null, + "type": "int" + }, + { + "name": "write-zeroes-alignment", + "default": null, + "type": "int" + }, + { + "name": "opt-transfer", + "default": null, + "type": "int" + }, + { + "name": "max-transfer", + "default": null, + "type": "int" + }, + { + "name": "max-hw-transfer", + "default": null, + "type": "int" + }, + { + "name": "max-iov", + "type": "int" + }, + { + "name": "max-hw-iov", + "default": null, + "type": "int" + }, + { + "name": "min-mem-alignment", + "type": "int" + }, + { + "name": "opt-mem-alignment", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "594", "tag": "type", "variants": [ { "case": "qcow2", - "type": "727" + "type": "728" }, { "case": "vmdk", - "type": "728" + "type": "729" }, { "case": "luks", - "type": "729" + "type": "730" }, { "case": "rbd", - "type": "730" + "type": "731" }, { "case": "file", - "type": "731" + "type": "732" } ], "members": [ { "name": "type", - "type": "726" + "type": "727" } ], "meta-type": "object" }, { - "name": "594", + "name": "595", "members": [ { "name": "block-backend" @@ -18980,12 +19047,12 @@ ] }, { - "name": "[595]", - "element-type": "595", + "name": "[596]", + "element-type": "596", "meta-type": "array" }, { - "name": "595", + "name": "596", "members": [ { "name": "consistent-read" @@ -19009,7 +19076,7 @@ ] }, { - "name": "596", + "name": "597", "members": [ { "type": "60" @@ -19021,16 +19088,16 @@ "meta-type": "alternate" }, { - "name": "[597]", - "element-type": "597", + "name": "[598]", + "element-type": "598", "meta-type": "array" }, { - "name": "597", + "name": "598", "members": [ { "name": "event", - "type": "732" + "type": "733" }, { "name": "state", @@ -19040,7 +19107,7 @@ { "name": "iotype", "default": null, - "type": "733" + "type": "734" }, { "name": "errno", @@ -19066,16 +19133,16 @@ "meta-type": "object" }, { - "name": "[598]", - "element-type": "598", + "name": "[599]", + "element-type": "599", "meta-type": "array" }, { - "name": "598", + "name": "599", "members": [ { "name": "event", - "type": "732" + "type": "733" }, { "name": "state", @@ -19090,7 +19157,7 @@ "meta-type": "object" }, { - "name": "599", + "name": "600", "members": [ { "name": "auto" @@ -19110,7 +19177,7 @@ ] }, { - "name": "600", + "name": "601", "members": [ { "name": "threads" @@ -19130,7 +19197,7 @@ ] }, { - "name": "601", + "name": "602", "members": [ { "name": "tcp" @@ -19146,7 +19213,7 @@ ] }, { - "name": "602", + "name": "603", "members": [ { "name": "crc32c" @@ -19170,11 +19237,11 @@ ] }, { - "name": "603", + "name": "604", "members": [ { "name": "type", - "type": "734" + "type": "735" }, { "name": "host", @@ -19184,7 +19251,7 @@ "meta-type": "object" }, { - "name": "604", + "name": "605", "members": [ { "type": "60" @@ -19199,62 +19266,62 @@ "meta-type": "alternate" }, { - "name": "605", + "name": "606", "members": [ { - "type": "735" + "type": "736" }, { - "type": "736" + "type": "737" } ], "meta-type": "alternate" }, { - "name": "606", + "name": "607", "tag": "format", "variants": [ { "case": "aes", - "type": "738" + "type": "739" }, { "case": "luks", - "type": "739" + "type": "740" } ], "members": [ { "name": "format", - "type": "737" + "type": "738" } ], "meta-type": "object" }, { - "name": "607", + "name": "608", "tag": "format", "variants": [ { "case": "aes", - "type": "738" + "type": "739" } ], "members": [ { "name": "format", - "type": "740" + "type": "741" } ], "meta-type": "object" }, { - "name": "[596]", - "element-type": "596", + "name": "[597]", + "element-type": "597", "meta-type": "array" }, { - "name": "608", + "name": "609", "members": [ { "name": "quorum" @@ -19270,42 +19337,42 @@ ] }, { - "name": "609", + "name": "610", "tag": "format", "variants": [ { "case": "luks", - "type": "742" + "type": "743" }, { "case": "luks2", - "type": "743" + "type": "744" }, { "case": "luks-any", - "type": "744" + "type": "745" } ], "members": [ { "name": "format", - "type": "741" + "type": "742" }, { "name": "parent", "default": null, - "type": "609" + "type": "610" } ], "meta-type": "object" }, { - "name": "[610]", - "element-type": "610", + "name": "[611]", + "element-type": "611", "meta-type": "array" }, { - "name": "610", + "name": "611", "members": [ { "name": "cephx" @@ -19321,12 +19388,12 @@ ] }, { - "name": "[611]", - "element-type": "611", + "name": "[612]", + "element-type": "612", "meta-type": "array" }, { - "name": "611", + "name": "612", "members": [ { "name": "host", @@ -19340,7 +19407,7 @@ "meta-type": "object" }, { - "name": "612", + "name": "613", "members": [ { "name": "primary" @@ -19356,7 +19423,7 @@ ] }, { - "name": "613", + "name": "614", "members": [ { "name": "host", @@ -19415,12 +19482,12 @@ "meta-type": "object" }, { - "name": "614", + "name": "615", "tag": "mode", "variants": [ { "case": "hash", - "type": "746" + "type": "747" }, { "case": "none", @@ -19434,13 +19501,13 @@ "members": [ { "name": "mode", - "type": "745" + "type": "746" } ], "meta-type": "object" }, { - "name": "615", + "name": "616", "members": [ { "name": "filename", @@ -19453,7 +19520,7 @@ { "name": "preallocation", "default": null, - "type": "747" + "type": "748" }, { "name": "nocow", @@ -19469,7 +19536,7 @@ "meta-type": "object" }, { - "name": "616", + "name": "617", "members": [ { "name": "location", @@ -19482,13 +19549,13 @@ { "name": "preallocation", "default": null, - "type": "747" + "type": "748" } ], "meta-type": "object" }, { - "name": "617", + "name": "618", "members": [ { "name": "key-secret", @@ -19498,27 +19565,27 @@ { "name": "cipher-alg", "default": null, - "type": "748" + "type": "749" }, { "name": "cipher-mode", "default": null, - "type": "749" + "type": "750" }, { "name": "ivgen-alg", "default": null, - "type": "750" + "type": "751" }, { "name": "ivgen-hash-alg", "default": null, - "type": "751" + "type": "752" }, { "name": "hash-alg", "default": null, - "type": "751" + "type": "752" }, { "name": "iter-time", @@ -19528,12 +19595,12 @@ { "name": "file", "default": null, - "type": "596" + "type": "597" }, { "name": "header", "default": null, - "type": "596" + "type": "597" }, { "name": "size", @@ -19542,13 +19609,13 @@ { "name": "preallocation", "default": null, - "type": "747" + "type": "748" } ], "meta-type": "object" }, { - "name": "618", + "name": "619", "members": [ { "name": "location", @@ -19562,11 +19629,11 @@ "meta-type": "object" }, { - "name": "619", + "name": "620", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "size", @@ -19581,11 +19648,11 @@ "meta-type": "object" }, { - "name": "620", + "name": "621", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "size", @@ -19599,22 +19666,22 @@ { "name": "encrypt", "default": null, - "type": "752" + "type": "753" } ], "meta-type": "object" }, { - "name": "621", + "name": "622", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "data-file", "default": null, - "type": "596" + "type": "597" }, { "name": "data-file-raw", @@ -19633,7 +19700,7 @@ { "name": "version", "default": null, - "type": "753" + "type": "754" }, { "name": "backing-file", @@ -19648,7 +19715,7 @@ { "name": "encrypt", "default": null, - "type": "752" + "type": "753" }, { "name": "cluster-size", @@ -19658,7 +19725,7 @@ { "name": "preallocation", "default": null, - "type": "747" + "type": "748" }, { "name": "lazy-refcounts", @@ -19673,17 +19740,17 @@ { "name": "compression-type", "default": null, - "type": "754" + "type": "755" } ], "meta-type": "object" }, { - "name": "622", + "name": "623", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "size", @@ -19713,7 +19780,7 @@ "meta-type": "object" }, { - "name": "623", + "name": "624", "members": [ { "name": "location", @@ -19731,13 +19798,13 @@ { "name": "encrypt", "default": null, - "type": "755" + "type": "756" } ], "meta-type": "object" }, { - "name": "624", + "name": "625", "members": [ { "name": "location", @@ -19751,11 +19818,11 @@ "meta-type": "object" }, { - "name": "625", + "name": "626", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "size", @@ -19764,17 +19831,17 @@ { "name": "preallocation", "default": null, - "type": "747" + "type": "748" } ], "meta-type": "object" }, { - "name": "626", + "name": "627", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "size", @@ -19793,7 +19860,7 @@ { "name": "subformat", "default": null, - "type": "756" + "type": "757" }, { "name": "block-state-zero", @@ -19804,11 +19871,11 @@ "meta-type": "object" }, { - "name": "627", + "name": "628", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "size", @@ -19817,12 +19884,12 @@ { "name": "extents", "default": null, - "type": "[596]" + "type": "[597]" }, { "name": "subformat", "default": null, - "type": "757" + "type": "758" }, { "name": "backing-file", @@ -19832,7 +19899,7 @@ { "name": "adapter-type", "default": null, - "type": "758" + "type": "759" }, { "name": "hwversion", @@ -19853,11 +19920,11 @@ "meta-type": "object" }, { - "name": "628", + "name": "629", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "size", @@ -19866,7 +19933,7 @@ { "name": "subformat", "default": null, - "type": "759" + "type": "760" }, { "name": "force-size", @@ -19877,11 +19944,11 @@ "meta-type": "object" }, { - "name": "629", + "name": "630", "members": [ { "name": "state", - "type": "760" + "type": "761" }, { "name": "new-secret", @@ -19912,12 +19979,12 @@ "meta-type": "object" }, { - "name": "630", + "name": "631", "members": [ { "name": "encrypt", "default": null, - "type": "761" + "type": "762" } ], "meta-type": "object" @@ -19928,7 +19995,7 @@ "meta-type": "builtin" }, { - "name": "631", + "name": "632", "members": [ { "name": "inet" @@ -19952,47 +20019,47 @@ ] }, { - "name": "632", + "name": "633", "members": [ { "name": "data", - "type": "613" + "type": "614" } ], "meta-type": "object" }, { - "name": "633", + "name": "634", "members": [ { "name": "data", - "type": "655" + "type": "656" } ], "meta-type": "object" }, { - "name": "634", + "name": "635", "members": [ { "name": "data", - "type": "656" + "type": "657" } ], "meta-type": "object" }, { - "name": "635", + "name": "636", "members": [ { "name": "data", - "type": "657" + "type": "658" } ], "meta-type": "object" }, { - "name": "636", + "name": "637", "members": [ { "name": "off" @@ -20012,7 +20079,7 @@ ] }, { - "name": "637", + "name": "638", "members": [ { "name": "file" @@ -20110,16 +20177,6 @@ "memory" ] }, - { - "name": "638", - "members": [ - { - "name": "data", - "type": "762" - } - ], - "meta-type": "object" - }, { "name": "639", "members": [ @@ -20261,12 +20318,22 @@ "meta-type": "object" }, { - "name": "[653]", - "element-type": "653", + "name": "653", + "members": [ + { + "name": "data", + "type": "777" + } + ], + "meta-type": "object" + }, + { + "name": "[654]", + "element-type": "654", "meta-type": "array" }, { - "name": "653", + "name": "654", "members": [ { "name": "str", @@ -20276,7 +20343,7 @@ "meta-type": "object" }, { - "name": "655", + "name": "656", "members": [ { "name": "path", @@ -20296,7 +20363,7 @@ "meta-type": "object" }, { - "name": "656", + "name": "657", "members": [ { "name": "cid", @@ -20310,7 +20377,7 @@ "meta-type": "object" }, { - "name": "657", + "name": "658", "members": [ { "name": "str", @@ -20320,27 +20387,27 @@ "meta-type": "object" }, { - "name": "658", + "name": "659", "members": [ { "name": "data", - "type": "777" + "type": "778" } ], "meta-type": "object" }, { - "name": "659", + "name": "660", "members": [ { "name": "data", - "type": "778" + "type": "779" } ], "meta-type": "object" }, { - "name": "660", + "name": "661", "members": [ { "name": "number" @@ -20356,7 +20423,7 @@ ] }, { - "name": "661", + "name": "662", "members": [ { "name": "data", @@ -20366,17 +20433,17 @@ "meta-type": "object" }, { - "name": "662", + "name": "663", "members": [ { "name": "data", - "type": "779" + "type": "780" } ], "meta-type": "object" }, { - "name": "663", + "name": "664", "members": [ { "name": "key" @@ -20404,41 +20471,41 @@ ] }, { - "name": "664", + "name": "665", "members": [ { "name": "data", - "type": "780" + "type": "781" } ], "meta-type": "object" }, { - "name": "665", + "name": "666", "members": [ { "name": "data", - "type": "781" + "type": "782" } ], "meta-type": "object" }, { - "name": "666", + "name": "667", "members": [ { "name": "data", - "type": "782" + "type": "783" } ], "meta-type": "object" }, { - "name": "667", + "name": "668", "members": [ { "name": "data", - "type": "783" + "type": "784" } ], "meta-type": "object" @@ -20449,7 +20516,7 @@ "meta-type": "builtin" }, { - "name": "668", + "name": "669", "members": [ { "name": "lctrl-lalt" @@ -20469,12 +20536,12 @@ ] }, { - "name": "[669]", - "element-type": "669", + "name": "[670]", + "element-type": "670", "meta-type": "array" }, { - "name": "669", + "name": "670", "members": [ { "name": "name", @@ -20487,13 +20554,13 @@ { "name": "transform", "default": null, - "type": "784" + "type": "785" } ], "meta-type": "object" }, { - "name": "670", + "name": "671", "members": [ { "name": "main" @@ -20509,7 +20576,7 @@ ] }, { - "name": "671", + "name": "672", "tag": "transport", "variants": [ { @@ -20518,27 +20585,27 @@ }, { "case": "exec", - "type": "786" + "type": "787" }, { "case": "rdma", - "type": "613" + "type": "614" }, { "case": "file", - "type": "787" + "type": "788" } ], "members": [ { "name": "transport", - "type": "785" + "type": "786" } ], "meta-type": "object" }, { - "name": "672", + "name": "673", "members": [ { "name": "abort" @@ -20597,17 +20664,17 @@ ] }, { - "name": "673", + "name": "674", "members": [ { "name": "data", - "type": "788" + "type": "789" } ], "meta-type": "object" }, { - "name": "674", + "name": "675", "members": [ { "name": "data", @@ -20617,7 +20684,7 @@ "meta-type": "object" }, { - "name": "675", + "name": "676", "members": [ { "name": "data", @@ -20627,7 +20694,7 @@ "meta-type": "object" }, { - "name": "676", + "name": "677", "members": [ { "name": "data", @@ -20637,7 +20704,7 @@ "meta-type": "object" }, { - "name": "677", + "name": "678", "members": [ { "name": "data", @@ -20647,7 +20714,7 @@ "meta-type": "object" }, { - "name": "678", + "name": "679", "members": [ { "name": "data", @@ -20657,7 +20724,7 @@ "meta-type": "object" }, { - "name": "679", + "name": "680", "members": [ { "name": "data", @@ -20667,7 +20734,7 @@ "meta-type": "object" }, { - "name": "680", + "name": "681", "members": [ { "name": "data", @@ -20677,7 +20744,7 @@ "meta-type": "object" }, { - "name": "681", + "name": "682", "members": [ { "name": "data", @@ -20687,7 +20754,7 @@ "meta-type": "object" }, { - "name": "682", + "name": "683", "members": [ { "name": "individual" @@ -20703,7 +20770,7 @@ ] }, { - "name": "683", + "name": "684", "members": [ { "name": "string" @@ -20743,12 +20810,12 @@ ] }, { - "name": "[684]", - "element-type": "684", + "name": "[685]", + "element-type": "685", "meta-type": "array" }, { - "name": "684", + "name": "685", "members": [ { "name": "name", @@ -20763,12 +20830,12 @@ "meta-type": "object" }, { - "name": "[685]", - "element-type": "685", + "name": "[686]", + "element-type": "686", "meta-type": "array" }, { - "name": "685", + "name": "686", "members": [ { "name": "name", @@ -20792,12 +20859,12 @@ "meta-type": "object" }, { - "name": "[686]", - "element-type": "686", + "name": "[687]", + "element-type": "687", "meta-type": "array" }, { - "name": "686", + "name": "687", "members": [ { "name": "case", @@ -20811,12 +20878,12 @@ "meta-type": "object" }, { - "name": "[687]", - "element-type": "687", + "name": "[688]", + "element-type": "688", "meta-type": "array" }, { - "name": "687", + "name": "688", "members": [ { "name": "type", @@ -20826,7 +20893,7 @@ "meta-type": "object" }, { - "name": "688", + "name": "689", "members": [ { "name": "deny" @@ -20842,12 +20909,12 @@ ] }, { - "name": "[689]", - "element-type": "689", + "name": "[690]", + "element-type": "690", "meta-type": "array" }, { - "name": "689", + "name": "690", "members": [ { "name": "match", @@ -20855,18 +20922,18 @@ }, { "name": "policy", - "type": "688" + "type": "689" }, { "name": "format", "default": null, - "type": "789" + "type": "790" } ], "meta-type": "object" }, { - "name": "690", + "name": "691", "members": [ { "name": "all" @@ -20886,7 +20953,7 @@ ] }, { - "name": "691", + "name": "692", "members": [ { "name": "before" @@ -20902,7 +20969,7 @@ ] }, { - "name": "692", + "name": "693", "members": [ { "name": "ctrl-ctrl" @@ -20934,7 +21001,7 @@ ] }, { - "name": "693", + "name": "694", "members": [ { "name": "raw" @@ -20950,7 +21017,7 @@ ] }, { - "name": "694", + "name": "695", "members": [ { "name": "iops-total", @@ -21051,7 +21118,7 @@ "meta-type": "object" }, { - "name": "695", + "name": "696", "members": [ { "name": "client" @@ -21067,7 +21134,7 @@ ] }, { - "name": "696", + "name": "697", "members": [ { "name": "uninitialized" @@ -21095,7 +21162,7 @@ ] }, { - "name": "697", + "name": "698", "members": [ { "name": "memory" @@ -21119,7 +21186,7 @@ ] }, { - "name": "698", + "name": "699", "members": [ { "name": "access-latency" @@ -21151,7 +21218,7 @@ ] }, { - "name": "699", + "name": "700", "members": [ { "name": "none" @@ -21171,7 +21238,7 @@ ] }, { - "name": "700", + "name": "701", "members": [ { "name": "none" @@ -21191,7 +21258,7 @@ ] }, { - "name": "701", + "name": "702", "members": [ { "name": "id", @@ -21230,7 +21297,7 @@ "meta-type": "object" }, { - "name": "702", + "name": "703", "members": [ { "name": "id", @@ -21253,7 +21320,7 @@ "meta-type": "object" }, { - "name": "703", + "name": "704", "members": [ { "name": "id", @@ -21292,7 +21359,7 @@ "meta-type": "object" }, { - "name": "704", + "name": "705", "members": [ { "name": "id", @@ -21319,7 +21386,7 @@ "meta-type": "object" }, { - "name": "705", + "name": "706", "members": [ { "name": "id", @@ -21344,7 +21411,7 @@ "meta-type": "object" }, { - "name": "706", + "name": "707", "members": [ { "name": "string" @@ -21368,7 +21435,7 @@ ] }, { - "name": "707", + "name": "708", "members": [ { "name": "mixing-engine", @@ -21398,7 +21465,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21409,7 +21476,7 @@ "meta-type": "object" }, { - "name": "708", + "name": "709", "members": [ { "name": "mixing-engine", @@ -21439,7 +21506,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21465,7 +21532,7 @@ "meta-type": "object" }, { - "name": "709", + "name": "710", "members": [ { "name": "mixing-engine", @@ -21495,7 +21562,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21511,7 +21578,7 @@ "meta-type": "object" }, { - "name": "710", + "name": "711", "members": [ { "name": "mixing-engine", @@ -21541,7 +21608,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21577,7 +21644,7 @@ "meta-type": "object" }, { - "name": "711", + "name": "712", "members": [ { "name": "mixing-engine", @@ -21607,7 +21674,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21633,7 +21700,7 @@ "meta-type": "object" }, { - "name": "712", + "name": "713", "members": [ { "name": "mixing-engine", @@ -21663,7 +21730,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21689,7 +21756,7 @@ "meta-type": "object" }, { - "name": "713", + "name": "714", "members": [ { "name": "mixing-engine", @@ -21719,7 +21786,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21745,7 +21812,7 @@ "meta-type": "object" }, { - "name": "714", + "name": "715", "members": [ { "name": "mixing-engine", @@ -21775,7 +21842,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21791,7 +21858,7 @@ "meta-type": "object" }, { - "name": "715", + "name": "716", "members": [ { "name": "desc", @@ -21806,7 +21873,7 @@ "meta-type": "object" }, { - "name": "716", + "name": "717", "members": [ { "name": "device", @@ -21830,11 +21897,11 @@ "meta-type": "object" }, { - "name": "717", + "name": "718", "members": [ { "name": "bus", - "type": "791" + "type": "792" }, { "name": "devices", @@ -21845,12 +21912,12 @@ "meta-type": "object" }, { - "name": "[718]", - "element-type": "718", + "name": "[719]", + "element-type": "719", "meta-type": "array" }, { - "name": "718", + "name": "719", "members": [ { "name": "bar", @@ -21882,7 +21949,7 @@ "meta-type": "object" }, { - "name": "719", + "name": "720", "members": [ { "type": "int" @@ -21897,7 +21964,7 @@ "meta-type": "alternate" }, { - "name": "720", + "name": "721", "members": [ { "name": "cumulative" @@ -21925,7 +21992,7 @@ ] }, { - "name": "721", + "name": "722", "members": [ { "name": "bytes" @@ -21949,7 +22016,7 @@ ] }, { - "name": "722", + "name": "723", "members": [ { "name": "protocols", @@ -21964,7 +22031,7 @@ "meta-type": "object" }, { - "name": "723", + "name": "724", "members": [ { "name": "builtin" @@ -21984,7 +22051,7 @@ ] }, { - "name": "724", + "name": "725", "members": [ { "name": "cache-data-parity" @@ -22052,7 +22119,7 @@ ] }, { - "name": "725", + "name": "726", "members": [ { "name": "unknown" @@ -22080,7 +22147,7 @@ ] }, { - "name": "726", + "name": "727", "members": [ { "name": "qcow2" @@ -22107,16 +22174,6 @@ "file" ] }, - { - "name": "727", - "members": [ - { - "name": "data", - "type": "792" - } - ], - "meta-type": "object" - }, { "name": "728", "members": [ @@ -22159,6 +22216,16 @@ }, { "name": "732", + "members": [ + { + "name": "data", + "type": "797" + } + ], + "meta-type": "object" + }, + { + "name": "733", "members": [ { "name": "l1_update" @@ -22358,7 +22425,7 @@ ] }, { - "name": "733", + "name": "734", "members": [ { "name": "read" @@ -22390,7 +22457,7 @@ ] }, { - "name": "734", + "name": "735", "members": [ { "name": "inet" @@ -22402,12 +22469,12 @@ ] }, { - "name": "735", + "name": "736", "members": [ { "name": "template", "default": null, - "type": "736" + "type": "737" }, { "name": "main-header", @@ -22458,7 +22525,7 @@ "meta-type": "object" }, { - "name": "736", + "name": "737", "members": [ { "name": "none" @@ -22482,7 +22549,7 @@ ] }, { - "name": "737", + "name": "738", "members": [ { "name": "aes" @@ -22498,7 +22565,7 @@ ] }, { - "name": "738", + "name": "739", "members": [ { "name": "key-secret", @@ -22509,7 +22576,7 @@ "meta-type": "object" }, { - "name": "739", + "name": "740", "members": [ { "name": "key-secret", @@ -22520,7 +22587,7 @@ "meta-type": "object" }, { - "name": "740", + "name": "741", "members": [ { "name": "aes" @@ -22532,7 +22599,7 @@ ] }, { - "name": "741", + "name": "742", "members": [ { "name": "luks" @@ -22552,7 +22619,7 @@ ] }, { - "name": "742", + "name": "743", "members": [ { "name": "key-secret", @@ -22562,7 +22629,7 @@ "meta-type": "object" }, { - "name": "743", + "name": "744", "members": [ { "name": "key-secret", @@ -22572,7 +22639,7 @@ "meta-type": "object" }, { - "name": "744", + "name": "745", "members": [ { "name": "key-secret", @@ -22582,7 +22649,7 @@ "meta-type": "object" }, { - "name": "745", + "name": "746", "members": [ { "name": "none" @@ -22602,11 +22669,11 @@ ] }, { - "name": "746", + "name": "747", "members": [ { "name": "type", - "type": "797" + "type": "798" }, { "name": "hash", @@ -22616,7 +22683,7 @@ "meta-type": "object" }, { - "name": "747", + "name": "748", "members": [ { "name": "off" @@ -22640,7 +22707,7 @@ ] }, { - "name": "748", + "name": "749", "members": [ { "name": "aes-128" @@ -22700,7 +22767,7 @@ ] }, { - "name": "749", + "name": "750", "members": [ { "name": "ecb" @@ -22724,7 +22791,7 @@ ] }, { - "name": "750", + "name": "751", "members": [ { "name": "plain" @@ -22744,7 +22811,7 @@ ] }, { - "name": "751", + "name": "752", "members": [ { "name": "md5" @@ -22784,28 +22851,28 @@ ] }, { - "name": "752", + "name": "753", "tag": "format", "variants": [ { "case": "qcow", - "type": "738" + "type": "739" }, { "case": "luks", - "type": "799" + "type": "800" } ], "members": [ { "name": "format", - "type": "798" + "type": "799" } ], "meta-type": "object" }, { - "name": "753", + "name": "754", "members": [ { "name": "v2" @@ -22821,7 +22888,7 @@ ] }, { - "name": "754", + "name": "755", "members": [ { "name": "zlib" @@ -22837,16 +22904,16 @@ ] }, { - "name": "755", + "name": "756", "tag": "format", "variants": [ { "case": "luks", - "type": "800" + "type": "801" }, { "case": "luks2", - "type": "801" + "type": "802" }, { "case": "luks-any", @@ -22856,13 +22923,13 @@ "members": [ { "name": "format", - "type": "741" + "type": "742" } ], "meta-type": "object" }, { - "name": "756", + "name": "757", "members": [ { "name": "dynamic" @@ -22878,7 +22945,7 @@ ] }, { - "name": "757", + "name": "758", "members": [ { "name": "monolithicSparse" @@ -22906,7 +22973,7 @@ ] }, { - "name": "758", + "name": "759", "members": [ { "name": "ide" @@ -22930,7 +22997,7 @@ ] }, { - "name": "759", + "name": "760", "members": [ { "name": "dynamic" @@ -22946,7 +23013,7 @@ ] }, { - "name": "760", + "name": "761", "members": [ { "name": "active" @@ -22962,12 +23029,12 @@ ] }, { - "name": "761", + "name": "762", "tag": "format", "variants": [ { "case": "luks", - "type": "802" + "type": "803" }, { "case": "qcow", @@ -22977,13 +23044,13 @@ "members": [ { "name": "format", - "type": "798" + "type": "799" } ], "meta-type": "object" }, { - "name": "762", + "name": "763", "members": [ { "name": "logfile", @@ -23013,7 +23080,7 @@ "meta-type": "object" }, { - "name": "763", + "name": "764", "members": [ { "name": "logfile", @@ -23033,7 +23100,7 @@ "meta-type": "object" }, { - "name": "764", + "name": "765", "members": [ { "name": "logfile", @@ -23106,7 +23173,7 @@ "meta-type": "object" }, { - "name": "765", + "name": "766", "members": [ { "name": "logfile", @@ -23131,7 +23198,7 @@ "meta-type": "object" }, { - "name": "766", + "name": "767", "members": [ { "name": "logfile", @@ -23152,7 +23219,7 @@ "meta-type": "object" }, { - "name": "767", + "name": "768", "members": [ { "name": "logfile", @@ -23168,7 +23235,7 @@ "meta-type": "object" }, { - "name": "768", + "name": "769", "members": [ { "name": "logfile", @@ -23188,7 +23255,7 @@ "meta-type": "object" }, { - "name": "769", + "name": "770", "members": [ { "name": "logfile", @@ -23208,7 +23275,7 @@ "meta-type": "object" }, { - "name": "770", + "name": "771", "members": [ { "name": "logfile", @@ -23229,7 +23296,7 @@ "meta-type": "object" }, { - "name": "771", + "name": "772", "members": [ { "name": "logfile", @@ -23249,7 +23316,7 @@ "meta-type": "object" }, { - "name": "772", + "name": "773", "members": [ { "name": "logfile", @@ -23269,7 +23336,7 @@ "meta-type": "object" }, { - "name": "773", + "name": "774", "members": [ { "name": "logfile", @@ -23295,7 +23362,7 @@ "meta-type": "object" }, { - "name": "774", + "name": "775", "members": [ { "name": "logfile", @@ -23315,7 +23382,7 @@ "meta-type": "object" }, { - "name": "775", + "name": "776", "members": [ { "name": "logfile", @@ -23351,7 +23418,7 @@ "meta-type": "object" }, { - "name": "776", + "name": "777", "members": [ { "name": "logfile", @@ -23372,7 +23439,7 @@ "meta-type": "object" }, { - "name": "777", + "name": "778", "members": [ { "name": "path", @@ -23388,7 +23455,7 @@ "meta-type": "object" }, { - "name": "778", + "name": "779", "members": [ { "name": "chardev", @@ -23398,7 +23465,7 @@ "meta-type": "object" }, { - "name": "779", + "name": "780", "members": [ { "name": "unmapped" @@ -24054,7 +24121,7 @@ ] }, { - "name": "780", + "name": "781", "members": [ { "name": "key", @@ -24068,11 +24135,11 @@ "meta-type": "object" }, { - "name": "781", + "name": "782", "members": [ { "name": "button", - "type": "803" + "type": "804" }, { "name": "down", @@ -24082,11 +24149,11 @@ "meta-type": "object" }, { - "name": "782", + "name": "783", "members": [ { "name": "axis", - "type": "804" + "type": "805" }, { "name": "value", @@ -24096,11 +24163,11 @@ "meta-type": "object" }, { - "name": "783", + "name": "784", "members": [ { "name": "type", - "type": "805" + "type": "806" }, { "name": "slot", @@ -24112,7 +24179,7 @@ }, { "name": "axis", - "type": "804" + "type": "805" }, { "name": "value", @@ -24122,7 +24189,7 @@ "meta-type": "object" }, { - "name": "784", + "name": "785", "members": [ { "name": "persistent", @@ -24133,7 +24200,7 @@ "meta-type": "object" }, { - "name": "785", + "name": "786", "members": [ { "name": "socket" @@ -24157,7 +24224,7 @@ ] }, { - "name": "786", + "name": "787", "members": [ { "name": "args", @@ -24167,7 +24234,7 @@ "meta-type": "object" }, { - "name": "787", + "name": "788", "members": [ { "name": "filename", @@ -24181,12 +24248,12 @@ "meta-type": "object" }, { - "name": "788", + "name": "789", "members": [], "meta-type": "object" }, { - "name": "789", + "name": "790", "members": [ { "name": "exact" @@ -24202,7 +24269,7 @@ ] }, { - "name": "790", + "name": "791", "members": [ { "name": "u8" @@ -24238,7 +24305,7 @@ ] }, { - "name": "791", + "name": "792", "members": [ { "name": "number", @@ -24254,21 +24321,21 @@ }, { "name": "io_range", - "type": "806" + "type": "807" }, { "name": "memory_range", - "type": "806" + "type": "807" }, { "name": "prefetchable_range", - "type": "806" + "type": "807" } ], "meta-type": "object" }, { - "name": "792", + "name": "793", "members": [ { "name": "compat", @@ -24306,22 +24373,22 @@ { "name": "encrypt", "default": null, - "type": "807" + "type": "808" }, { "name": "bitmaps", "default": null, - "type": "[808]" + "type": "[809]" }, { "name": "compression-type", - "type": "754" + "type": "755" } ], "meta-type": "object" }, { - "name": "793", + "name": "794", "members": [ { "name": "create-type", @@ -24337,34 +24404,34 @@ }, { "name": "extents", - "type": "[809]" + "type": "[810]" } ], "meta-type": "object" }, { - "name": "794", + "name": "795", "members": [ { "name": "cipher-alg", - "type": "748" + "type": "749" }, { "name": "cipher-mode", - "type": "749" + "type": "750" }, { "name": "ivgen-alg", - "type": "750" + "type": "751" }, { "name": "ivgen-hash-alg", "default": null, - "type": "751" + "type": "752" }, { "name": "hash-alg", - "type": "751" + "type": "752" }, { "name": "detached-header", @@ -24384,24 +24451,24 @@ }, { "name": "slots", - "type": "[810]" + "type": "[811]" } ], "meta-type": "object" }, { - "name": "795", + "name": "796", "members": [ { "name": "encryption-format", "default": null, - "type": "741" + "type": "742" } ], "meta-type": "object" }, { - "name": "796", + "name": "797", "members": [ { "name": "extent-size-hint", @@ -24412,7 +24479,7 @@ "meta-type": "object" }, { - "name": "797", + "name": "798", "members": [ { "name": "md5" @@ -24432,7 +24499,7 @@ ] }, { - "name": "798", + "name": "799", "members": [ { "name": "qcow" @@ -24448,7 +24515,7 @@ ] }, { - "name": "799", + "name": "800", "members": [ { "name": "key-secret", @@ -24458,27 +24525,27 @@ { "name": "cipher-alg", "default": null, - "type": "748" + "type": "749" }, { "name": "cipher-mode", "default": null, - "type": "749" + "type": "750" }, { "name": "ivgen-alg", "default": null, - "type": "750" + "type": "751" }, { "name": "ivgen-hash-alg", "default": null, - "type": "751" + "type": "752" }, { "name": "hash-alg", "default": null, - "type": "751" + "type": "752" }, { "name": "iter-time", @@ -24489,7 +24556,7 @@ "meta-type": "object" }, { - "name": "800", + "name": "801", "members": [ { "name": "key-secret", @@ -24498,13 +24565,13 @@ { "name": "cipher-alg", "default": null, - "type": "748" + "type": "749" } ], "meta-type": "object" }, { - "name": "801", + "name": "802", "members": [ { "name": "key-secret", @@ -24513,17 +24580,17 @@ { "name": "cipher-alg", "default": null, - "type": "748" + "type": "749" } ], "meta-type": "object" }, { - "name": "802", + "name": "803", "members": [ { "name": "state", - "type": "760" + "type": "761" }, { "name": "new-secret", @@ -24554,7 +24621,7 @@ "meta-type": "object" }, { - "name": "803", + "name": "804", "members": [ { "name": "left" @@ -24602,7 +24669,7 @@ ] }, { - "name": "804", + "name": "805", "members": [ { "name": "x" @@ -24618,7 +24685,7 @@ ] }, { - "name": "805", + "name": "806", "members": [ { "name": "begin" @@ -24646,7 +24713,7 @@ ] }, { - "name": "806", + "name": "807", "members": [ { "name": "base", @@ -24660,12 +24727,12 @@ "meta-type": "object" }, { - "name": "807", + "name": "808", "tag": "format", "variants": [ { "case": "luks", - "type": "794" + "type": "795" }, { "case": "aes", @@ -24675,18 +24742,18 @@ "members": [ { "name": "format", - "type": "737" + "type": "738" } ], "meta-type": "object" }, { - "name": "[808]", - "element-type": "808", + "name": "[809]", + "element-type": "809", "meta-type": "array" }, { - "name": "808", + "name": "809", "members": [ { "name": "name", @@ -24698,18 +24765,18 @@ }, { "name": "flags", - "type": "[811]" + "type": "[812]" } ], "meta-type": "object" }, { - "name": "[809]", - "element-type": "809", + "name": "[810]", + "element-type": "810", "meta-type": "array" }, { - "name": "809", + "name": "810", "members": [ { "name": "filename", @@ -24737,12 +24804,12 @@ "meta-type": "object" }, { - "name": "[810]", - "element-type": "810", + "name": "[811]", + "element-type": "811", "meta-type": "array" }, { - "name": "810", + "name": "811", "members": [ { "name": "active", @@ -24766,12 +24833,12 @@ "meta-type": "object" }, { - "name": "[811]", - "element-type": "811", + "name": "[812]", + "element-type": "812", "meta-type": "array" }, { - "name": "811", + "name": "812", "members": [ { "name": "in-use" @@ -27799,15 +27866,15 @@ "name": "iothread", "type": "link<iothread>" }, - { - "name": "serial", - "type": "str" - }, { "default-value": 0, "name": "cyls", "type": "uint32" }, + { + "name": "serial", + "type": "str" + }, { "default-value": 0, "name": "min_io_size", @@ -27970,6 +28037,12 @@ "description": "on/off", "type": "bool" }, + { + "default-value": true, + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, { "default-value": "auto", "name": "account-failed", @@ -27977,10 +28050,9 @@ "type": "OnOffAuto" }, { - "default-value": true, - "name": "indirect_desc", - "description": "on/off", - "type": "bool" + "default-value": [], + "name": "stats-intervals", + "type": "list" }, { "default-value": true, @@ -29313,8 +29385,8 @@ }, { "default-value": 0, - "name": "min_io_size", - "type": "size" + "name": "heads", + "type": "uint32" }, { "name": "product", @@ -29327,8 +29399,8 @@ }, { "default-value": 0, - "name": "heads", - "type": "uint32" + "name": "min_io_size", + "type": "size" }, { "default-value": true, @@ -29412,6 +29484,11 @@ "name": "port_wwn", "type": "uint64" }, + { + "default-value": 0, + "name": "lheads", + "type": "uint32" + }, { "default-value": 0, "name": "port_index", @@ -29424,9 +29501,9 @@ "type": "OnOffAuto" }, { - "default-value": 0, - "name": "lheads", - "type": "uint32" + "default-value": [], + "name": "stats-intervals", + "type": "list" }, { "name": "device_id", @@ -29546,24 +29623,29 @@ }, { "default-value": 0, - "name": "cyls", + "name": "lcyls", "type": "uint32" }, { "default-value": 0, - "name": "lcyls", + "name": "cyls", "type": "uint32" }, + { + "default-value": "auto", + "name": "rerror", + "description": "Error handling policy (report/ignore/enospc/stop/auto)", + "type": "BlockdevOnError" + }, { "default-value": 0, "name": "opt_io_size", "type": "size" }, { - "default-value": "auto", - "name": "rerror", - "description": "Error handling policy (report/ignore/enospc/stop/auto)", - "type": "BlockdevOnError" + "default-value": 0, + "name": "min_io_size", + "type": "size" }, { "default-value": "auto", @@ -29572,9 +29654,9 @@ "type": "BiosAtaTranslation" }, { - "default-value": 0, - "name": "min_io_size", - "type": "size" + "default-value": [], + "name": "stats-intervals", + "type": "list" }, { "default-value": "auto", @@ -29863,25 +29945,31 @@ "type": "str" }, { - "default-value": false, - "name": "commandlog", - "description": "on/off", - "type": "bool" + "default-value": "auto", + "name": "account-invalid", + "description": "on/off/auto", + "type": "OnOffAuto" }, { - "default-value": "auto", - "name": "rerror", - "description": "Error handling policy (report/ignore/enospc/stop/auto)", - "type": "BlockdevOnError" + "name": "drive", + "description": "Node name or ID of a block device to use as a backend", + "type": "str" }, { "default-value": 0, - "name": "min_io_size", + "name": "logical_block_size", + "description": "A power of two between 512 B and 2 MiB", "type": "size" }, + { + "default-value": false, + "name": "share-rw", + "description": "on/off", + "type": "bool" + }, { "default-value": "auto", - "name": "backend_defaults", + "name": "write-cache", "description": "on/off/auto", "type": "OnOffAuto" }, @@ -29892,28 +29980,21 @@ "type": "bool" }, { - "default-value": false, - "name": "share-rw", - "description": "on/off", - "type": "bool" + "default-value": 4294967295, + "name": "discard_granularity", + "type": "size" }, { "default-value": "auto", - "name": "account-failed", + "name": "backend_defaults", "description": "on/off/auto", "type": "OnOffAuto" }, - { - "default-value": 0, - "name": "logical_block_size", - "description": "A power of two between 512 B and 2 MiB", - "type": "size" - }, { "default-value": "auto", - "name": "write-cache", - "description": "on/off/auto", - "type": "OnOffAuto" + "name": "rerror", + "description": "Error handling policy (report/ignore/enospc/stop/auto)", + "type": "BlockdevOnError" }, { "default-value": 0, @@ -29921,20 +30002,20 @@ "type": "size" }, { - "default-value": "auto", - "name": "account-invalid", - "description": "on/off/auto", - "type": "OnOffAuto" + "default-value": 0, + "name": "min_io_size", + "type": "size" }, { - "name": "drive", - "description": "Node name or ID of a block device to use as a backend", - "type": "str" + "default-value": [], + "name": "stats-intervals", + "type": "list" }, { - "default-value": 4294967295, - "name": "discard_granularity", - "type": "size" + "default-value": "auto", + "name": "account-failed", + "description": "on/off/auto", + "type": "OnOffAuto" }, { "default-value": 0, @@ -29942,6 +30023,12 @@ "description": "A power of two between 512 B and 2 MiB", "type": "size" }, + { + "default-value": false, + "name": "commandlog", + "description": "on/off", + "type": "bool" + }, { "default-value": "auto", "name": "werror", diff --git a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml index 3e5e2cdb08..59d33c7049 100644 --- a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml @@ -217,7 +217,7 @@ <flag name='acpi-generic-initiator'/> <version>10001050</version> <microcodeVersion>43100287</microcodeVersion> - <package>v10.1.0-1060-geb7abb4a71</package> + <package>v10.1.0-1063-g3bf55b83ef</package> <arch>x86_64</arch> <hostCPU type='kvm' model='base' migratability='yes'> <property name='avx-ne-convert' type='boolean' value='false'/> -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> The capability tracks support for 'stats-intervals' property of disk frontends which enables statistics collection on the devices. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_capabilities.c | 5 +++++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml | 1 + 3 files changed, 7 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 618291e5b6..7d643c5357 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -746,6 +746,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 485 */ "acpi-generic-initiator", /* QEMU_CAPS_ACPI_GENERIC_INITIATOR */ + "disk-timed-stats", /* QEMU_CAPS_DISK_TIMED_STATS */ ); @@ -1478,6 +1479,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioBlk[] = { { "queue-size", QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE, NULL }, { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL }, { "iothread-vq-mapping", QEMU_CAPS_VIRTIO_BLK_IOTHREAD_MAPPING, NULL }, + { "stats-intervals", QEMU_CAPS_DISK_TIMED_STATS, NULL }, }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioNet[] = { @@ -1509,9 +1511,11 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVfioPCI[] = { static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsSCSIDisk[] = { { "channel", QEMU_CAPS_SCSI_DISK_CHANNEL, NULL }, { "rotation_rate", QEMU_CAPS_ROTATION_RATE, NULL }, + { "stats-intervals", QEMU_CAPS_DISK_TIMED_STATS, NULL }, }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsIDEDrive[] = { + { "stats-intervals", QEMU_CAPS_DISK_TIMED_STATS, NULL }, }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsPiix4PM[] = { @@ -1523,6 +1527,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBRedir[] = { }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBStorage[] = { + { "stats-intervals", QEMU_CAPS_DISK_TIMED_STATS, NULL }, }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsKVMPit[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index c71fc19a03..3e9963bb85 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -727,6 +727,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ /* 485 */ QEMU_CAPS_ACPI_GENERIC_INITIATOR, /* -object acpi-generic-initiator */ + QEMU_CAPS_DISK_TIMED_STATS, /* timed stats support ('stats-intervals' property of disk frontends) */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml index 59d33c7049..49fdb6edba 100644 --- a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml @@ -215,6 +215,7 @@ <flag name='tdx-guest'/> <flag name='qom-list-get'/> <flag name='acpi-generic-initiator'/> + <flag name='disk-timed-stats'/> <version>10001050</version> <microcodeVersion>43100287</microcodeVersion> <package>v10.1.0-1063-g3bf55b83ef</package> -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> QEMU supports collection of disk statistics in configurable time windows. Add support for enabling this feature to the conf parser. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- docs/formatdomain.rst | 17 ++++++++++++++++ src/conf/domain_conf.c | 34 +++++++++++++++++++++++++++++++ src/conf/domain_conf.h | 2 ++ src/conf/schemas/domaincommon.rng | 11 ++++++++++ 4 files changed, 64 insertions(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index f50dce477f..f46a21463f 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -3588,6 +3588,23 @@ paravirtualized driver is specified via the ``disk`` element. </iothreads> </driver> + - The optional ``statistics`` sub-element allows configuring statistics + collection in configurable intervals for the given disk. Intervals are + configured by ``<statistic>`` sub-elements with ``interval`` attribute + configuring the collection window duration in seconds. The statistics + are available via the bulk statistics API. + + Example:: + + <driver name='qemu'> + <statistics> + <statistic interval='1'/> + <statistic interval='10'/> + </statistics> + </driver> + + :since:`Since 11.9.0 (QEMU 10.2, virtio, ide, scsi disks only)`. + - The optional ``queues`` attribute specifies the number of virt queues for virtio-blk ( :since:`Since 3.9.0` ) or vhost-user-blk ( :since:`Since 7.1.0` ) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 281846dfbe..b6832d193a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8288,6 +8288,8 @@ static int virDomainDiskDefDriverParseXML(virDomainDiskDef *def, xmlNodePtr cur) { + xmlNodePtr statisticsNode; + def->driverName = virXMLPropString(cur, "name"); if (virXMLPropEnum(cur, "cache", virDomainDiskCacheTypeFromString, @@ -8337,6 +8339,26 @@ virDomainDiskDefDriverParseXML(virDomainDiskDef *def, if (virDomainIothreadMappingDefParse(cur, &def->iothreads) < 0) return -1; + if ((statisticsNode = virXMLNodeGetSubelement(cur, "statistics"))) { + g_autoptr(GPtrArray) statisticNodes = NULL; + + statisticNodes = virXMLNodeGetSubelementList(statisticsNode, "statistic"); + + if (statisticNodes->len > 0) { + size_t i; + + def->statistics = g_new0(unsigned int, statisticNodes->len + 1); + + for (i = 0; i < statisticNodes->len; i++) { + if (virXMLPropUInt(g_ptr_array_index(statisticNodes, i), + "interval", 10, + VIR_XML_PROP_REQUIRED | VIR_XML_PROP_NONZERO, + def->statistics + i) < 0) + return -1; + } + } + } + if (virXMLPropEnum(cur, "detect_zeroes", virDomainDiskDetectZeroesTypeFromString, VIR_XML_PROP_NONZERO, &def->detect_zeroes) < 0) @@ -23826,6 +23848,18 @@ virDomainDiskDefFormatDriver(virBuffer *buf, virDomainIothreadMappingDefFormat(&childBuf, disk->iothreads); + if (disk->statistics) { + g_auto(virBuffer) statisticsChildBuf = VIR_BUFFER_INIT_CHILD(&childBuf); + size_t i; + + for (i = 0; disk->statistics[i] > 0; i++) + virBufferAsprintf(&statisticsChildBuf, "<statistic interval='%u'/>\n", + disk->statistics[i]); + + virXMLFormatElement(&childBuf, "statistics", NULL, &statisticsChildBuf); + } + + virXMLFormatElement(buf, "driver", &attrBuf, &childBuf); } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 39807b5fe3..4110ca75ac 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -591,6 +591,8 @@ struct _virDomainDiskDef { virDomainDiskDiscard discard; unsigned int iothread; /* unused = 0, > 0 specific thread # */ GSList *iothreads; /* List of virDomainIothreadMappingDef */ + unsigned int *statistics; /* Optional, zero terminated list of intervals to + collect statistics for */ virDomainDiskDetectZeroes detect_zeroes; virTristateSwitch discard_no_unref; char *domain_name; /* backend domain name */ diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index b9230a35b4..1303c392ae 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -2742,6 +2742,17 @@ <optional> <ref name="iothreadMapping"/> </optional> + <optional> + <element name="statistics"> + <zeroOrMore> + <element name="statistic"> + <attribute name="interval"> + <ref name="unsignedInt"/> + </attribute> + </element> + </zeroOrMore> + </element> + </optional> </interleave> </element> </define> -- 2.51.0
From: Peter Krempa <pkrempa@redhat.com> Add validation that qemu supports the collection of statistics and enable it on the block device commandline. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_command.c | 15 +++++ src/qemu/qemu_validate.c | 29 ++++++++++ ...sk-statistics-intervals.x86_64-latest.args | 37 ++++++++++++ ...isk-statistics-intervals.x86_64-latest.xml | 57 +++++++++++++++++++ .../disk-statistics-intervals.xml | 46 +++++++++++++++ tests/qemuxmlconftest.c | 1 + 6 files changed, 185 insertions(+) create mode 100644 tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.args create mode 100644 tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/disk-statistics-intervals.xml diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 08e2a5147d..7ed2b43330 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1688,6 +1688,7 @@ qemuBuildDiskDeviceProps(const virDomainDef *def, const char *alias = disk->info.alias; g_autofree char *usbdiskalias = NULL; const virDomainDeviceInfo *deviceinfo = &disk->info; + g_autoptr(virJSONValue) statistics = NULL; virDomainDeviceInfo usbSCSIinfo = { .type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE, .addr.drive = { .diskbus = VIR_DOMAIN_DISK_BUS_USB }, @@ -1895,6 +1896,19 @@ qemuBuildDiskDeviceProps(const virDomainDef *def, qemuBuildDiskGetErrorPolicy(disk, &wpolicy, &rpolicy); + if (disk->statistics) { + size_t i; + + statistics = virJSONValueNewArray(); + + for (i = 0; disk->statistics[i] > 0; i++) { + g_autoptr(virJSONValue) num = virJSONValueNewNumberUint(disk->statistics[i]); + + if (virJSONValueArrayAppend(statistics, &num) < 0) + return NULL; + } + } + if (virJSONValueObjectAdd(&props, "S:device_id", scsiVPDDeviceId, "T:share-rw", shareRW, @@ -1919,6 +1933,7 @@ qemuBuildDiskDeviceProps(const virDomainDef *def, "S:serial", serial, "S:werror", wpolicy, "S:rerror", rpolicy, + "A:stats-intervals", &statistics, NULL) < 0) return NULL; diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 7f3ffe8bd5..036b399945 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3358,6 +3358,35 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDomainDiskDef *disk, if (qemuValidateDomainDeviceDefDiskIOThreads(def, disk, qemuCaps) < 0) return -1; + if (disk->statistics) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DISK_TIMED_STATS)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("statistics collection is not supported by this QEMU binary")); + return -1; + } + + switch (disk->bus) { + case VIR_DOMAIN_DISK_BUS_SCSI: + case VIR_DOMAIN_DISK_BUS_IDE: + case VIR_DOMAIN_DISK_BUS_SATA: + case VIR_DOMAIN_DISK_BUS_VIRTIO: + case VIR_DOMAIN_DISK_BUS_USB: + break; + + case VIR_DOMAIN_DISK_BUS_FDC: + case VIR_DOMAIN_DISK_BUS_NVME: + case VIR_DOMAIN_DISK_BUS_XEN: + case VIR_DOMAIN_DISK_BUS_SD: + case VIR_DOMAIN_DISK_BUS_NONE: + case VIR_DOMAIN_DISK_BUS_UML: + case VIR_DOMAIN_DISK_BUS_LAST: + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("statistics collection is not supported by disks on bus '%1$s'"), + NULLSTR(virDomainDiskBusTypeToString(disk->bus))); + return -1; + } + } + return 0; } diff --git a/tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.args b/tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.args new file mode 100644 index 0000000000..3dd3dee99d --- /dev/null +++ b/tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.args @@ -0,0 +1,37 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 2,sockets=2,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-scsi-pci","id":"scsi0","bus":"pci.0","addr":"0x2"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/iothrtest1.img","node-name":"libvirt-2-storage","read-only":false}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x3","drive":"libvirt-2-storage","id":"virtio-disk0","bootindex":1,"stats-intervals":[3,10]}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/iothrtest2.img","node-name":"libvirt-1-storage","read-only":false}' \ +-device '{"driver":"scsi-hd","bus":"scsi0.0","channel":0,"scsi-id":0,"lun":3,"device_id":"drive-scsi0-0-0-3","drive":"libvirt-1-storage","id":"scsi0-0-0-3","stats-intervals":[5,15]}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.xml b/tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.xml new file mode 100644 index 0000000000..4c55c50ef5 --- /dev/null +++ b/tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.xml @@ -0,0 +1,57 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>2</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> + </cpu> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'> + <statistics> + <statistic interval='3'/> + <statistic interval='10'/> + </statistics> + </driver> + <source file='/var/lib/libvirt/images/iothrtest1.img'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'> + <statistics> + <statistic interval='5'/> + <statistic interval='15'/> + </statistics> + </driver> + <source file='/var/lib/libvirt/images/iothrtest2.img'/> + <target dev='sdc' bus='scsi'/> + <address type='drive' controller='0' bus='0' target='0' unit='3'/> + </disk> + <controller type='usb' index='0' model='piix3-uhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <controller type='ide' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <controller type='pci' index='0' model='pci-root'/> + <controller type='scsi' index='0' model='virtio-scsi'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </controller> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxmlconfdata/disk-statistics-intervals.xml b/tests/qemuxmlconfdata/disk-statistics-intervals.xml new file mode 100644 index 0000000000..f5e801f5a8 --- /dev/null +++ b/tests/qemuxmlconfdata/disk-statistics-intervals.xml @@ -0,0 +1,46 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>2</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'> + <statistics> + <statistic interval='3'/> + <statistic interval='10'/> + </statistics> + </driver> + <source file='/var/lib/libvirt/images/iothrtest1.img'/> + <target dev='vda' bus='virtio'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'> + <statistics> + <statistic interval='5'/> + <statistic interval='15'/> + </statistics> + </driver> + <source file='/var/lib/libvirt/images/iothrtest2.img'/> + <target dev='sdc' bus='scsi'/> + <address type='drive' controller='0' bus='0' target='0' unit='3'/> + </disk> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <controller type='scsi' index='0' model='virtio-scsi'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c index 55c622176a..39e8679bb9 100644 --- a/tests/qemuxmlconftest.c +++ b/tests/qemuxmlconftest.c @@ -1827,6 +1827,7 @@ mymain(void) DO_TEST_CAPS_LATEST("disk-slices"); DO_TEST_CAPS_LATEST("disk-rotation"); + DO_TEST_CAPS_LATEST("disk-statistics-intervals"); DO_TEST_CAPS_ARCH_LATEST("disk-arm-virtio-sd", "aarch64"); -- 2.51.0
On 10/9/25 17:16, Peter Krempa via Devel wrote:
This series is RFC as there's pending QEMU work enabling either of the groups:
For the limits the following qemu patches are needed:
https://lists.nongnu.org/archive/html/qemu-block/2025-09/msg00804.html
For timed stats, the statistics already exist but can't be enabled without:
https://lists.nongnu.org/archive/html/qemu-block/2025-10/msg00040.html
Patches 1-8 are cleanups and refactors
Patches 9-10 extract and expose the block backing file limits.
Patches 11-12 extract and expose the timed statistics
Patch 13 is qemu capabilities update with the necessary changes and is not to be merged upstream; will be replaced by a proper update.
Patches 14-16 add infrastructure to enable timed stats.
Peter Krempa (16): qemu: monitor: Remove qemuMonitorQueryBlockstats qemu_monitor_json.c: Use consistent function hader coding style qemu_monitor_json.h: Use consistent function hader coding style qemu: monitor: Rework qemuBlockStats into a g_object qemuMigrationCookieAddNBD: Use qemuBlockGetNamedNodeData to fetch the capacities qemuMonitorJSONBlockStatsUpdateCapacityData: Merge into caller qemuMonitorJSONGetAllBlockStatsInfo: Directly probe data from 'query-named-block-nodes' Remove qemuMonitorBlockStatsUpdateCapacityBlockdev qemu: monitor: Extract block limit values Expose qemu storage request limits via bulk stats API qemu_monitor: Extract 'timed_stats' of block devices Expose qemu timed block statistics via bulk stats API DO_NOT_MERGE: Update qemu capabilities after adding patches for block limits and timed stats qemu: capabilities: Introduce QEMU_CAPS_DISK_TIMED_STATS conf: Add configuration option for timed disk statistics collection qemu: Add support for enabling timed block device statistics collection
docs/formatdomain.rst | 17 + docs/manpages/virsh.rst | 54 + include/libvirt/libvirt-domain.h | 326 ++++ src/conf/domain_conf.c | 34 + src/conf/domain_conf.h | 2 + src/conf/schemas/domaincommon.rng | 11 + src/qemu/qemu_capabilities.c | 5 + src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 15 + src/qemu/qemu_driver.c | 203 ++- src/qemu/qemu_migration_cookie.c | 17 +- src/qemu/qemu_monitor.c | 58 +- src/qemu/qemu_monitor.h | 1191 ++++++++------ src/qemu/qemu_monitor_json.c | 607 +++++--- src/qemu/qemu_monitor_json.h | 6 - src/qemu/qemu_validate.c | 29 + .../caps_10.2.0_x86_64.replies | 1373 +++++++++-------- .../caps_10.2.0_x86_64.xml | 3 +- tests/qemumonitorjsontest.c | 2 + ...sk-statistics-intervals.x86_64-latest.args | 37 + ...isk-statistics-intervals.x86_64-latest.xml | 57 + .../disk-statistics-intervals.xml | 46 + tests/qemuxmlconftest.c | 1 + 23 files changed, 2686 insertions(+), 1409 deletions(-) create mode 100644 tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.args create mode 100644 tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/disk-statistics-intervals.xml
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> If you're willing to merge cleanup patches now go ahead. Or wait until QEMU part is merged. Whatever. Michal
participants (2)
-
Michal Prívozník -
Peter Krempa