@samitouri / QOSamiQemu / commits / af82c8c3e8

migration/qapi: Rename MigrationStats to MigrationRAMStats

This stats is only about RAM, make it accurate. This paves way for statistics for all devices. Thanks to Markus, who pointed out that docs/devel/qapi-code-gen.rst has a section "Compatibility considerations" stated: Since type names are not visible in the Client JSON Protocol, types may be freely renamed. Even certain refactorings are invisible, such as splitting members from one type into a common base type. Hence this change is not ABI violation according to the document. While at it, touch up the lines to make it read better, correct the restriction on migration status being 'active' or 'completed': over time we grew too many new status that will also report "ram" section. Cc: Daniel P. Berrangé <berrange@redhat.com> Cc: devel@lists.libvirt.org Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Juraj Marcin <jmarcin@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Link: https://lore.kernel.org/r/20260421202110.306051-4-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com>

Peter Xu committed Apr 21, 2026 at 16:20 UTC af82c8c3e8d1166222eaa477573efef5ff2c8219
3 files changed +7 -7
docs/about/removed-features.rst
+1 -1
@@ -699,7 +699,7 @@ was superseded by ``sections``.
699 ``query-migrate`` return value member ``skipped`` (removed in 9.1)
700 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
701
702 -Member ``skipped`` of the ``MigrationStats`` struct hasn't been used
702 +Member ``skipped`` of the ``MigrationRAMStats`` struct hasn't been used
703 for more than 10 years. Removed with no replacement.
704
705 ``migrate`` command option ``inc`` (removed in 9.1)
migration/migration-stats.h
+1 -1
@@ -27,7 +27,7 @@
27
28 /*
29 * These are the ram migration statistic counters. It is loosely
30 - * based on MigrationStats.
30 + * based on MigrationRAMStats.
31 */
32 typedef struct {
33 /*
qapi/migration.json
+5 -5
@@ -12,7 +12,7 @@
12 { 'include': 'sockets.json' }
13
14 ##
15 -# @MigrationStats:
15 +# @MigrationRAMStats:
16 #
17 # Detailed migration status.
18 #
@@ -64,7 +64,7 @@
64 #
65 # Since: 0.14
66 ##
67 -{ 'struct': 'MigrationStats',
67 +{ 'struct': 'MigrationRAMStats',
68 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
69 'duplicate': 'int',
70 'normal': 'int',
@@ -209,8 +209,8 @@
209 # If this field is not returned, no migration process has been
210 # initiated
211 #
212 -# @ram: `MigrationStats` containing detailed migration status, only
213 -# returned if status is 'active' or 'completed'(since 1.2)
212 +# @ram: Detailed migration RAM statistics, only returned if migration
213 +# is in progress or completed (since 1.2)
214 #
215 # @xbzrle-cache: `XBZRLECacheStats` containing detailed XBZRLE
216 # migration statistics, only returned if XBZRLE feature is on and
@@ -309,7 +309,7 @@
309 # Since: 0.14
310 ##
311 { 'struct': 'MigrationInfo',
312 - 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
312 + 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationRAMStats',
313 '*vfio': 'VfioStats',
314 '*xbzrle-cache': 'XBZRLECacheStats',
315 '*total-time': 'int',