On 02.05.23 19:41, Peter Xu wrote:
  ##
  # @query-colo-status:
@@ -1674,7 +1676,8 @@
  # Since: 3.1
  ##
  { 'command': 'query-colo-status',
-  'returns': 'COLOStatus' }
+  'returns': 'COLOStatus',
+  'if': 'CONFIG_REPLICATION' }
I still see a bunch of other colo related definitions around in the qapi
schema, e.g. COLOExitReason.  Is it intended to leave them as is?


Removing them will make us to add more and more ifdefs in the code.

We decided to keep x-colo capability.
One more enum field is colo migration status - not worse than x-colo enum 
field, and is not possible with replication disabled

The others (like COLOExitReason) are just structure definitions - not a public 
API, so no reason to care about.

The exclustion is COLOStatus, we have to handle it. If not compilation fails:

qapi/qapi-commands-migration.c:821:13: error: ‘qmp_marshal_output_COLOStatus’ 
defined but not used [-Werror=unused-function]
  821 | static void qmp_marshal_output_COLOStatus(COLOStatus *ret_in,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors


- COLOStatus becomes unused with replication disabled, as it is used only in 
migration/colo.c

--
Best regards,
Vladimir


Reply via email to