Migration: Create options.c for capabilities/params/properties
v3 cover Migration: Create options.c for capabilities/params/properties
Hi
In this v3:
- Rebase on top of latest.
- Fix review of migrate_use_tls() comments.
- Remaining of the patches not yet reviewed.
Please review.
[v2]
- the first two patches are included on the last pull request.
- Changed copyright from Anthony to Orit (thanks David) Some archeology required.
- Get all the reviews by from Vladimir.
- Rebased on top of my last pull request.
The first two patches don't belong in this series, but without them I got lots of confilcts if you try to use the series. That two patches are independently on the list.
Please review.
[v1]
This series move to options.c:
- all migration capabilities code
- all migration parameters code
- all properties code
- all qmp commands that only touch the previous
And once there:
- sort of functions
- make consistent and coherent all the functions naming/typing
- create accessors for the parameters/capabilties that don't exist
- more cleanups here and there.
Todo:
- There is still capabilities code on savevm.c, but I want this in before moving that code to options.c, but still needs more thought for my part. I.e. should I put vmstate sections in options.c, or should I create new functions to access the capabilities in savevm.c.
Please review.
Juan Quintela (13):
migration: Move migrate_use_tls() to options.c
migration: Move qmp_migrate_set_parameters() to options.c
migration: Create migrate_params_init() function
migration: Make all functions check have the same format
migration: Create migrate_downtime_limit() function
migration: Move migrate_set_block_incremental() to options.c
migration: Move block_cleanup_parameters() to options.c
migration: Remove MigrationState from block_cleanup_parameters()
migration: Create migrate_tls_creds() function
migration: Create migrate_tls_authz() function
migration: Create migrate_tls_hostname() function
migration: Create migrate_block_bitmap_mapping() function
migration: Move migration_properties to options.c
migration/block-dirty-bitmap.c | 14 +- migration/migration.c | 640 +------------------------- migration/migration.h | 2 - migration/options.c | 818 ++++++++++++++++++++++++++++----- migration/options.h | 30 ++ migration/tls.c | 23 +- 6 files changed, 761 insertions(+), 766 deletions(-)
Signature · 1 line
2.39.2
PATCH v3 1/13 migration: Move migrate_use_tls() to options.c
Once there, rename it to migrate_tls() and make it return bool for consistency.
---
Fix typos found by fabiano
--- migration/migration.c | 9 --------- migration/migration.h | 2 -- migration/options.c | 11 ++++++++++- migration/options.h | 1 + migration/tls.c | 3 ++- 5 files changed, 13 insertions(+), 13 deletions(-)
migration/migration.c +0 -9
@@ -2177,15 +2177,6 @@ void qmp_migrate_continue(MigrationStatus state, Error **errp)qemu_sem_post (&s->pause_sem); } -int migrate_use_tls (void ) -{ -MigrationState *s; - - s =migrate_get_current (); - -return s->parameters.tls_creds && *s->parameters.tls_creds; -} -/* migration thread support */ /* * Something bad happened to the RP stream, mark an error
migration/migration.h +0 -2
@@ -447,8 +447,6 @@ bool migration_is_blocked(Error **errp);bool migration_in_postcopy (void );MigrationState *migrate_get_current (void ); -int migrate_use_tls (void ); -uint64_t ram_get_total_transferred_pages (void );/* Sending on the return path - generic and then for each message type */
migration/options.c +10 -1
@@ -214,6 +214,15 @@ bool migrate_postcopy(void)return migrate_postcopy_ram () ||migrate_dirty_bitmaps (); } +bool migrate_tls (void ) +{ +MigrationState *s; + + s =migrate_get_current (); + +return s->parameters.tls_creds && *s->parameters.tls_creds; +} + typedef enum WriteTrackingSupport { WT_SUPPORT_UNKNOWN = 0, WT_SUPPORT_ABSENT,
@@ -363,7 +372,7 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp) new_caps[MIGRATION_CAPABILITY_COMPRESS] || new_caps[MIGRATION_CAPABILITY_XBZRLE] || migrate_multifd_compression() || - migrate_use_tls())) { + migrate_tls())) {error_setg (errp,"Zero copy only available for non-compressed non-TLS multifd migration" );return false;
migration/options.h +1 -0
@@ -46,6 +46,7 @@ bool migrate_zero_copy_send(void);*/ bool migrate_postcopy (void ); +bool migrate_tls (void );/* capabilities helpers */
migration/tls.c +2 -1
@@ -22,6 +22,7 @@#include "channel.h" #include "migration.h" #include "tls.h" +#include "options.h" #include "crypto/tlscreds.h" #include "qemu/error-report.h" #include "qapi/error.h"
@@ -165,7 +166,7 @@ void migration_tls_channel_connect(MigrationState *s,bool migrate_channel_requires_tls_upgrade (QIOChannel *ioc) { -if (!migrate_use_tls ()) { +if (!migrate_tls ()) {return false; }
Signature · 1 line
2.39.2
Re: [PATCH v3 01/13] migration: Move migrate_use_tls() to options.c
Quoted 4 lines · Juan Quintela
Once there, rename it to
migrate_tls()and make it return bool for consistency.Signed-off-by Juan Quintela<[email protected]>
Signature · 2 lines
Best regards, Vladimir
PATCH v3 2/13 migration: Move qmp_migrate_set_parameters() to options.c
In reply to Juan Quintela--- migration/migration.c | 420 ------------------------------------------ migration/options.c | 418 +++++++++++++++++++++++++++++++++++++++++ migration/options.h | 11 ++ 3 files changed, 429 insertions(+), 420 deletions(-)
migration/migration.c +0 -420
@@ -67,19 +67,10 @@#define MAX_THROTTLE (128 << 20)/* Migration transfer speed throttling */ -/* Amount of time to allocate to each "chunk" of bandwidth-throttled -* data. */ -#define BUFFER_DELAY 100 -#define XFER_LIMIT_RATIO (1000 / BUFFER_DELAY) -/* Time in milliseconds we are allowed to stop the source, * for sending the last part */ #define DEFAULT_MIGRATE_SET_DOWNTIME 300 -/* Maximum migrate downtime set to 2000 seconds */ -#define MAX_MIGRATE_DOWNTIME_SECONDS 2000 -#define MAX_MIGRATE_DOWNTIME (MAX_MIGRATE_DOWNTIME_SECONDS * 1000) -/* Default compression thread count */ #define DEFAULT_MIGRATE_COMPRESS_THREAD_COUNT 8/* Default decompression thread count, usually decompression is at
@@ -1140,417 +1131,6 @@ MigrationInfo *qmp_query_migrate(Error **errp)return info; } -/* -* Check whether the parameters are valid. Error will be put into errp -* (if provided). Return true if valid, otherwise false. -*/ -static bool migrate_params_check (MigrationParameters *params,Error **errp) -{ -if (params->has_compress_level && - (params->compress_level >9 )) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"compress_level" , -"a value between 0 and 9" ); -return false; - } - -if (params->has_compress_threads && (params->compress_threads <1 )) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"compress_threads" , -"a value between 1 and 255" ); -return false; - } - -if (params->has_decompress_threads && (params->decompress_threads <1 )) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"decompress_threads" , -"a value between 1 and 255" ); -return false; - } - -if (params->has_throttle_trigger_threshold && - (params->throttle_trigger_threshold <1 || - params->throttle_trigger_threshold >100 )) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"throttle_trigger_threshold" , -"an integer in the range of 1 to 100" ); -return false; - } - -if (params->has_cpu_throttle_initial && - (params->cpu_throttle_initial <1 || - params->cpu_throttle_initial >99 )) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"cpu_throttle_initial" , -"an integer in the range of 1 to 99" ); -return false; - } - -if (params->has_cpu_throttle_increment && - (params->cpu_throttle_increment <1 || - params->cpu_throttle_increment >99 )) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"cpu_throttle_increment" , -"an integer in the range of 1 to 99" ); -return false; - } - -if (params->has_max_bandwidth && (params->max_bandwidth >SIZE_MAX )) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"max_bandwidth" , - "an integer in the range of 0 to "stringify(SIZE_MAX) -" bytes/second" ); -return false; - } - -if (params->has_downtime_limit && - (params->downtime_limit >MAX_MIGRATE_DOWNTIME )) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"downtime_limit" , - "an integer in the range of 0 to " - stringify(MAX_MIGRATE_DOWNTIME)" ms"); -return false; - } - -/* x_checkpoint_delay is now always positive */ - -if (params->has_multifd_channels && (params->multifd_channels <1 )) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"multifd_channels" , -"a value between 1 and 255" ); -return false; - } - -if (params->has_multifd_zlib_level && - (params->multifd_zlib_level >9 )) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"multifd_zlib_level" , -"a value between 0 and 9" ); -return false; - } - -if (params->has_multifd_zstd_level && - (params->multifd_zstd_level >20 )) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"multifd_zstd_level" , -"a value between 0 and 20" ); -return false; - } - -if (params->has_xbzrle_cache_size && - (params->xbzrle_cache_size <qemu_target_page_size () || - !is_power_of_2 (params->xbzrle_cache_size))) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"xbzrle_cache_size" , -"a power of two no less than the target page size" ); -return false; - } - -if (params->has_max_cpu_throttle && - (params->max_cpu_throttle < params->cpu_throttle_initial || - params->max_cpu_throttle >99 )) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"max_cpu_throttle" , -"an integer in the range of cpu_throttle_initial to 99" ); -return false; - } - -if (params->has_announce_initial && - params->announce_initial >100000 ) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"announce_initial" , -"a value between 0 and 100000" ); -return false; - } -if (params->has_announce_max && - params->announce_max >100000 ) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"announce_max" , -"a value between 0 and 100000" ); -return false; - } -if (params->has_announce_rounds && - params->announce_rounds >1000 ) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"announce_rounds" , -"a value between 0 and 1000" ); -return false; - } -if (params->has_announce_step && - (params->announce_step <1 || - params->announce_step >10000 )) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"announce_step" , -"a value between 0 and 10000" ); -return false; - } - -if (params->has_block_bitmap_mapping && - !check_dirty_bitmap_mig_alias_map (params->block_bitmap_mapping, errp)) { -error_prepend (errp,"Invalid mapping given for block-bitmap-mapping: " ); -return false; - } - -#ifdef CONFIG_LINUX -if (migrate_zero_copy_send () && - ((params->has_multifd_compression && params->multifd_compression) || - (params->tls_creds && *params->tls_creds))) { -error_setg (errp, -"Zero copy only available for non-compressed non-TLS multifd migration" ); -return false; - } -#endif - -return true; -} - -static void migrate_params_test_apply (MigrateSetParameters *params, -MigrationParameters *dest) -{ - *dest =migrate_get_current ()->parameters; - -/* TODO use QAPI_CLONE() instead of duplicating it inline */ - -if (params->has_compress_level) { - dest->compress_level = params->compress_level; - } - -if (params->has_compress_threads) { - dest->compress_threads = params->compress_threads; - } - -if (params->has_compress_wait_thread) { - dest->compress_wait_thread = params->compress_wait_thread; - } - -if (params->has_decompress_threads) { - dest->decompress_threads = params->decompress_threads; - } - -if (params->has_throttle_trigger_threshold) { - dest->throttle_trigger_threshold = params->throttle_trigger_threshold; - } - -if (params->has_cpu_throttle_initial) { - dest->cpu_throttle_initial = params->cpu_throttle_initial; - } - -if (params->has_cpu_throttle_increment) { - dest->cpu_throttle_increment = params->cpu_throttle_increment; - } - -if (params->has_cpu_throttle_tailslow) { - dest->cpu_throttle_tailslow = params->cpu_throttle_tailslow; - } - -if (params->tls_creds) { -assert (params->tls_creds->type ==QTYPE_QSTRING ); - dest->tls_creds = params->tls_creds->u.s; - } - -if (params->tls_hostname) { -assert (params->tls_hostname->type ==QTYPE_QSTRING ); - dest->tls_hostname = params->tls_hostname->u.s; - } - -if (params->has_max_bandwidth) { - dest->max_bandwidth = params->max_bandwidth; - } - -if (params->has_downtime_limit) { - dest->downtime_limit = params->downtime_limit; - } - -if (params->has_x_checkpoint_delay) { - dest->x_checkpoint_delay = params->x_checkpoint_delay; - } - -if (params->has_block_incremental) { - dest->block_incremental = params->block_incremental; - } -if (params->has_multifd_channels) { - dest->multifd_channels = params->multifd_channels; - } -if (params->has_multifd_compression) { - dest->multifd_compression = params->multifd_compression; - } -if (params->has_xbzrle_cache_size) { - dest->xbzrle_cache_size = params->xbzrle_cache_size; - } -if (params->has_max_postcopy_bandwidth) { - dest->max_postcopy_bandwidth = params->max_postcopy_bandwidth; - } -if (params->has_max_cpu_throttle) { - dest->max_cpu_throttle = params->max_cpu_throttle; - } -if (params->has_announce_initial) { - dest->announce_initial = params->announce_initial; - } -if (params->has_announce_max) { - dest->announce_max = params->announce_max; - } -if (params->has_announce_rounds) { - dest->announce_rounds = params->announce_rounds; - } -if (params->has_announce_step) { - dest->announce_step = params->announce_step; - } - -if (params->has_block_bitmap_mapping) { - dest->has_block_bitmap_mapping = true; - dest->block_bitmap_mapping = params->block_bitmap_mapping; - } -} - -static void migrate_params_apply (MigrateSetParameters *params,Error **errp) -{ -MigrationState *s =migrate_get_current (); - -/* TODO use QAPI_CLONE() instead of duplicating it inline */ - -if (params->has_compress_level) { - s->parameters.compress_level = params->compress_level; - } - -if (params->has_compress_threads) { - s->parameters.compress_threads = params->compress_threads; - } - -if (params->has_compress_wait_thread) { - s->parameters.compress_wait_thread = params->compress_wait_thread; - } - -if (params->has_decompress_threads) { - s->parameters.decompress_threads = params->decompress_threads; - } - -if (params->has_throttle_trigger_threshold) { - s->parameters.throttle_trigger_threshold = params->throttle_trigger_threshold; - } - -if (params->has_cpu_throttle_initial) { - s->parameters.cpu_throttle_initial = params->cpu_throttle_initial; - } - -if (params->has_cpu_throttle_increment) { - s->parameters.cpu_throttle_increment = params->cpu_throttle_increment; - } - -if (params->has_cpu_throttle_tailslow) { - s->parameters.cpu_throttle_tailslow = params->cpu_throttle_tailslow; - } - -if (params->tls_creds) { -g_free (s->parameters.tls_creds); -assert (params->tls_creds->type ==QTYPE_QSTRING ); - s->parameters.tls_creds =g_strdup (params->tls_creds->u.s); - } - -if (params->tls_hostname) { -g_free (s->parameters.tls_hostname); -assert (params->tls_hostname->type ==QTYPE_QSTRING ); - s->parameters.tls_hostname =g_strdup (params->tls_hostname->u.s); - } - -if (params->tls_authz) { -g_free (s->parameters.tls_authz); -assert (params->tls_authz->type ==QTYPE_QSTRING ); - s->parameters.tls_authz =g_strdup (params->tls_authz->u.s); - } - -if (params->has_max_bandwidth) { - s->parameters.max_bandwidth = params->max_bandwidth; -if (s->to_dst_file && !migration_in_postcopy ()) { -qemu_file_set_rate_limit (s->to_dst_file, - s->parameters.max_bandwidth /XFER_LIMIT_RATIO ); - } - } - -if (params->has_downtime_limit) { - s->parameters.downtime_limit = params->downtime_limit; - } - -if (params->has_x_checkpoint_delay) { - s->parameters.x_checkpoint_delay = params->x_checkpoint_delay; -if (migration_in_colo_state ()) { -colo_checkpoint_notify (s); - } - } - -if (params->has_block_incremental) { - s->parameters.block_incremental = params->block_incremental; - } -if (params->has_multifd_channels) { - s->parameters.multifd_channels = params->multifd_channels; - } -if (params->has_multifd_compression) { - s->parameters.multifd_compression = params->multifd_compression; - } -if (params->has_xbzrle_cache_size) { - s->parameters.xbzrle_cache_size = params->xbzrle_cache_size; -xbzrle_cache_resize (params->xbzrle_cache_size, errp); - } -if (params->has_max_postcopy_bandwidth) { - s->parameters.max_postcopy_bandwidth = params->max_postcopy_bandwidth; -if (s->to_dst_file &&migration_in_postcopy ()) { -qemu_file_set_rate_limit (s->to_dst_file, - s->parameters.max_postcopy_bandwidth /XFER_LIMIT_RATIO ); - } - } -if (params->has_max_cpu_throttle) { - s->parameters.max_cpu_throttle = params->max_cpu_throttle; - } -if (params->has_announce_initial) { - s->parameters.announce_initial = params->announce_initial; - } -if (params->has_announce_max) { - s->parameters.announce_max = params->announce_max; - } -if (params->has_announce_rounds) { - s->parameters.announce_rounds = params->announce_rounds; - } -if (params->has_announce_step) { - s->parameters.announce_step = params->announce_step; - } - -if (params->has_block_bitmap_mapping) { -qapi_free_BitmapMigrationNodeAliasList ( - s->parameters.block_bitmap_mapping); - - s->parameters.has_block_bitmap_mapping = true; - s->parameters.block_bitmap_mapping = -QAPI_CLONE (BitmapMigrationNodeAliasList, - params->block_bitmap_mapping); - } -} - -void qmp_migrate_set_parameters (MigrateSetParameters *params,Error **errp) -{ -MigrationParameters tmp; - -/* TODO Rewrite "" to null instead */ -if (params->tls_creds - && params->tls_creds->type ==QTYPE_QNULL ) { -qobject_unref (params->tls_creds->u.n); - params->tls_creds->type =QTYPE_QSTRING ; - params->tls_creds->u.s =strdup ("" ); - } -/* TODO Rewrite "" to null instead */ -if (params->tls_hostname - && params->tls_hostname->type ==QTYPE_QNULL ) { -qobject_unref (params->tls_hostname->u.n); - params->tls_hostname->type =QTYPE_QSTRING ; - params->tls_hostname->u.s =strdup ("" ); - } - -migrate_params_test_apply (params, &tmp); - -if (!migrate_params_check (&tmp, errp)) { -/* Invalid parameter */ -return ; - } - -migrate_params_apply (params, errp); -} - -void qmp_migrate_start_postcopy (Error **errp) {MigrationState *s =migrate_get_current ();
migration/options.c +418 -0
438 lines not on this page · raw message
migration/options.h +11 -0
@@ -14,6 +14,13 @@#ifndef QEMU_MIGRATION_OPTIONS_H #define QEMU_MIGRATION_OPTIONS_H +/* constants */ + +/* Amount of time to allocate to each "chunk" of bandwidth-throttled +* data. */ +#define BUFFER_DELAY 100 +#define XFER_LIMIT_RATIO (1000 / BUFFER_DELAY) +/* capabilities */ bool migrate_auto_converge (void );
@@ -74,4 +81,8 @@ int migrate_multifd_zstd_level(void);uint8_t migrate_throttle_trigger_threshold (void );uint64_t migrate_xbzrle_cache_size (void ); +/* parameters helpers */ + +bool migrate_params_check (MigrationParameters *params,Error **errp); +#endif
Signature · 1 line
2.39.2
Re: [PATCH v3 02/13] migration: Move qmp_migrate_set_parameters() to options.c
Quoted 1 line · Juan Quintela
Signed-off-by Juan Quintela<[email protected]>
Signature · 2 lines
Best regards, Vladimir
PATCH v3 3/13 migration: Create migrate_params_init() function
In reply to Juan Quintela--- migration/migration.c | 29 +---------------------------- migration/options.c | 31 +++++++++++++++++++++++++++++++ migration/options.h | 1 + 3 files changed, 33 insertions(+), 28 deletions(-)
migration/migration.c +1 -28
@@ -3470,7 +3470,6 @@ static void migration_instance_finalize(Object *obj)static void migration_instance_init (Object *obj) {MigrationState *ms =MIGRATION_OBJ (obj); -MigrationParameters *params = &ms->parameters; ms->state =MIGRATION_STATUS_NONE ; ms->mbps =-1 ;
@@ -3478,33 +3477,7 @@ static void migration_instance_init(Object *obj)qemu_sem_init (&ms->pause_sem,0 );qemu_mutex_init (&ms->error_mutex); - params->tls_hostname =g_strdup ("" ); - params->tls_creds =g_strdup ("" ); - -/* Set has_* up only for parameter checks */ - params->has_compress_level = true; - params->has_compress_threads = true; - params->has_compress_wait_thread = true; - params->has_decompress_threads = true; - params->has_throttle_trigger_threshold = true; - params->has_cpu_throttle_initial = true; - params->has_cpu_throttle_increment = true; - params->has_cpu_throttle_tailslow = true; - params->has_max_bandwidth = true; - params->has_downtime_limit = true; - params->has_x_checkpoint_delay = true; - params->has_block_incremental = true; - params->has_multifd_channels = true; - params->has_multifd_compression = true; - params->has_multifd_zlib_level = true; - params->has_multifd_zstd_level = true; - params->has_xbzrle_cache_size = true; - params->has_max_postcopy_bandwidth = true; - params->has_max_cpu_throttle = true; - params->has_announce_initial = true; - params->has_announce_max = true; - params->has_announce_rounds = true; - params->has_announce_step = true; +migrate_params_init (&ms->parameters);qemu_sem_init (&ms->postcopy_pause_sem,0 );qemu_sem_init (&ms->postcopy_pause_rp_sem,0 );
migration/options.c +31 -0
@@ -738,6 +738,37 @@ MigrationParameters *qmp_query_migrate_parameters(Error **errp)return params; } +void migrate_params_init (MigrationParameters *params) +{ + params->tls_hostname =g_strdup ("" ); + params->tls_creds =g_strdup ("" ); + +/* Set has_* up only for parameter checks */ + params->has_compress_level = true; + params->has_compress_threads = true; + params->has_compress_wait_thread = true; + params->has_decompress_threads = true; + params->has_throttle_trigger_threshold = true; + params->has_cpu_throttle_initial = true; + params->has_cpu_throttle_increment = true; + params->has_cpu_throttle_tailslow = true; + params->has_max_bandwidth = true; + params->has_downtime_limit = true; + params->has_x_checkpoint_delay = true; + params->has_block_incremental = true; + params->has_multifd_channels = true; + params->has_multifd_compression = true; + params->has_multifd_zlib_level = true; + params->has_multifd_zstd_level = true; + params->has_xbzrle_cache_size = true; + params->has_max_postcopy_bandwidth = true; + params->has_max_cpu_throttle = true; + params->has_announce_initial = true; + params->has_announce_max = true; + params->has_announce_rounds = true; + params->has_announce_step = true; +} +/* * Check whether the parameters are valid. Error will be put into errp * (if provided). Return true if valid, otherwise false.
migration/options.h +1 -0
@@ -84,5 +84,6 @@ uint64_t migrate_xbzrle_cache_size(void);/* parameters helpers */ bool migrate_params_check (MigrationParameters *params,Error **errp); +void migrate_params_init (MigrationParameters *params);#endif
Signature · 1 line
2.39.2
Re: [PATCH v3 03/13] migration: Create migrate_params_init() function
Quoted 1 line · Juan Quintela
Signed-off-by Juan Quintela<[email protected]>
Signature · 2 lines
Best regards, Vladimir
PATCH v3 4/13 migration: Make all functions check have the same format
In reply to Juan Quintela--- migration/options.c | 153 +++++++++++--------------------------------- 1 file changed, 39 insertions(+), 114 deletions(-)
migration/options.c +39 -114
@@ -33,27 +33,21 @@bool migrate_auto_converge (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_AUTO_CONVERGE ]; }bool migrate_background_snapshot (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_BACKGROUND_SNAPSHOT ]; }bool migrate_block (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_BLOCK ]; }
@@ -61,95 +55,76 @@ bool migrate_block(void)bool migrate_colo (void ) {MigrationState *s =migrate_get_current (); +return s->capabilities[MIGRATION_CAPABILITY_X_COLO ]; }bool migrate_compress (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_COMPRESS ]; }bool migrate_dirty_bitmaps (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_DIRTY_BITMAPS ]; }bool migrate_events (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_EVENTS ]; }bool migrate_ignore_shared (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_X_IGNORE_SHARED ]; }bool migrate_late_block_activate (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_LATE_BLOCK_ACTIVATE ]; }bool migrate_multifd (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_MULTIFD ]; }bool migrate_pause_before_switchover (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_PAUSE_BEFORE_SWITCHOVER ]; }bool migrate_postcopy_blocktime (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_POSTCOPY_BLOCKTIME ]; }bool migrate_postcopy_preempt (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_POSTCOPY_PREEMPT ]; }bool migrate_postcopy_ram (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_POSTCOPY_RAM ]; }
@@ -163,54 +138,42 @@ bool migrate_rdma_pin_all(void)bool migrate_release_ram (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_RELEASE_RAM ]; }bool migrate_return_path (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_RETURN_PATH ]; }bool migrate_validate_uuid (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_VALIDATE_UUID ]; }bool migrate_xbzrle (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_XBZRLE ]; }bool migrate_zero_blocks (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_ZERO_BLOCKS ]; }bool migrate_zero_copy_send (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->capabilities[MIGRATION_CAPABILITY_ZERO_COPY_SEND ]; }
@@ -224,9 +187,7 @@ bool migrate_postcopy(void)bool migrate_tls (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.tls_creds && *s->parameters.tls_creds; }
@@ -493,126 +454,98 @@ void qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params,bool migrate_block_incremental (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.block_incremental; }uint32_t migrate_checkpoint_delay (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.x_checkpoint_delay; }int migrate_compress_level (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.compress_level; }int migrate_compress_threads (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.compress_threads; }int migrate_compress_wait_thread (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.compress_wait_thread; }uint8_t migrate_cpu_throttle_increment (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.cpu_throttle_increment; }uint8_t migrate_cpu_throttle_initial (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.cpu_throttle_initial; }bool migrate_cpu_throttle_tailslow (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.cpu_throttle_tailslow; }int migrate_decompress_threads (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.decompress_threads; }uint8_t migrate_max_cpu_throttle (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.max_cpu_throttle; }uint64_t migrate_max_bandwidth (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.max_bandwidth; }int64_t migrate_max_postcopy_bandwidth (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.max_postcopy_bandwidth; }int migrate_multifd_channels (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.multifd_channels; }MultiFDCompression migrate_multifd_compression (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();assert (s->parameters.multifd_compression <MULTIFD_COMPRESSION__MAX );return s->parameters.multifd_compression;
@@ -620,36 +553,28 @@ MultiFDCompression migrate_multifd_compression(void)int migrate_multifd_zlib_level (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.multifd_zlib_level; }int migrate_multifd_zstd_level (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.multifd_zstd_level; }uint8_t migrate_throttle_trigger_threshold (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.throttle_trigger_threshold; }uint64_t migrate_xbzrle_cache_size (void ) { -MigrationState *s; - - s =migrate_get_current (); +MigrationState *s =migrate_get_current ();return s->parameters.xbzrle_cache_size; }
Signature · 1 line
2.39.2
Re: [PATCH v3 04/13] migration: Make all functions check have the same format
Quoted 1 line · Juan Quintela
Signed-off-by Juan Quintela<[email protected]>
Signature · 2 lines
Best regards, Vladimir
PATCH v3 5/13 migration: Create migrate_downtime_limit() function
In reply to Juan Quintela--- migration/migration.c | 4 ++-- migration/options.c | 7 +++++++ migration/options.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-)
migration/migration.c +2 -2
@@ -2737,7 +2737,7 @@ static void migration_update_counters(MigrationState *s, transferred = current_bytes - s->iteration_initial_bytes; time_spent = current_time - s->iteration_start_time; bandwidth = (double )transferred / time_spent; - s->threshold_size = bandwidth * s->parameters.downtime_limit; + s->threshold_size = bandwidth *migrate_downtime_limit (); s->mbps = (((double ) transferred *8.0 ) / ((double ) time_spent /1000.0 )) /1000.0 /1000.0 ;
@@ -3244,7 +3244,7 @@ void migrate_fd_connect(MigrationState *s, Error *error_in)*/ migrate_error_free (s); - s->expected_downtime = s->parameters.downtime_limit; + s->expected_downtime =migrate_downtime_limit ();if (resume) {assert (s->cleanup_bh); }else {
migration/options.c +7 -0
@@ -515,6 +515,13 @@ int migrate_decompress_threads(void)return s->parameters.decompress_threads; } +uint64_t migrate_downtime_limit (void ) +{ +MigrationState *s =migrate_get_current (); + +return s->parameters.downtime_limit; +} +uint8_t migrate_max_cpu_throttle (void ) {MigrationState *s =migrate_get_current ();
migration/options.h +1 -0
@@ -71,6 +71,7 @@ uint8_t migrate_cpu_throttle_increment(void);uint8_t migrate_cpu_throttle_initial (void );bool migrate_cpu_throttle_tailslow (void );int migrate_decompress_threads (void ); +uint64_t migrate_downtime_limit (void );uint8_t migrate_max_cpu_throttle (void );uint64_t migrate_max_bandwidth (void );int64_t migrate_max_postcopy_bandwidth (void );
Signature · 1 line
2.39.2
Re: [PATCH v3 05/13] migration: Create migrate_downtime_limit() function
Quoted 1 line · Juan Quintela
Signed-off-by Juan Quintela<[email protected]>
Signature · 2 lines
Best regards, Vladimir
PATCH v3 6/13 migration: Move migrate_set_block_incremental() to options.c
In reply to Juan QuintelaOnce there, make it more regular and remove th eneed for MigrationState parameter.
--- migration/migration.c | 9 ++------- migration/options.c | 9 +++++++++ migration/options.h | 4 ++++ 3 files changed, 15 insertions(+), 7 deletions(-)
migration/migration.c +2 -7
@@ -1164,17 +1164,12 @@ void migrate_set_state(int *state, int old_state, int new_state) } } -static void migrate_set_block_incremental (MigrationState *s,bool value) -{ - s->parameters.block_incremental = value; -} -static void block_cleanup_parameters (MigrationState *s) {if (s->must_remove_block_options) {/* setting to false can never fail */ migrate_cap_set (MIGRATION_CAPABILITY_BLOCK , false, &error_abort); -migrate_set_block_incremental (s, false); +migrate_set_block_incremental (false); s->must_remove_block_options = false; } }
@@ -1668,7 +1663,7 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc, }if (blk_inc) { -migrate_set_block_incremental (s, true); +migrate_set_block_incremental (true); }migrate_init (s);
migration/options.c +9 -0
@@ -586,6 +586,15 @@ uint64_t migrate_xbzrle_cache_size(void)return s->parameters.xbzrle_cache_size; } +/* parameter setters */ + +void migrate_set_block_incremental (bool value) +{ +MigrationState *s =migrate_get_current (); + + s->parameters.block_incremental = value; +} +/* parameters helpers */ AnnounceParameters *migrate_announce_params (void )
migration/options.h +4 -0
@@ -82,6 +82,10 @@ int migrate_multifd_zstd_level(void);uint8_t migrate_throttle_trigger_threshold (void );uint64_t migrate_xbzrle_cache_size (void ); +/* parameters setters */ + +void migrate_set_block_incremental (bool value); +/* parameters helpers */ bool migrate_params_check (MigrationParameters *params,Error **errp);
Signature · 1 line
2.39.2
Re: [PATCH v3 06/13] migration: Move migrate_set_block_incremental() to options.c
Quoted 1 line · Juan Quintela
Once there, make it more regular and remove th eneed for
some type here
Quoted 1 line
MigrationState parameter.
Signature · 2 lines
Best regards, Vladimir
Re: [PATCH v3 06/13] migration: Move migrate_set_block_incremental() to options.c
Quoted 4 lines · Vladimir Sementsov-Ogievskiy
Quoted 1 line · Juan Quintela
Once there, make it more regular and remove th eneed for
some type here
haha, and my typo here
Quoted 5 lines
Quoted 2 lines
MigrationState parameter.
Reviewed-by Vladimir Sementsov-Ogievskiy <[email protected]>
Signature · 2 lines
Best regards, Vladimir
Re: [PATCH v3 06/13] migration: Move migrate_set_block_incremental() to options.c
In reply to Vladimir Sementsov-OgievskiyQuoted 4 lines · Vladimir Sementsov-Ogievskiy
Quoted 1 line · Juan Quintela
Once there, make it more regular and remove th eneed for
some type here
Thanks, fixed.
Quoted 4 lines
Quoted 2 lines
MigrationState parameter.
Reviewed-by Vladimir Sementsov-Ogievskiy <[email protected]>
PATCH v3 7/13 migration: Move block_cleanup_parameters() to options.c
In reply to Juan Quintela--- migration/migration.c | 10 ---------- migration/options.c | 10 ++++++++++ migration/options.h | 1 + 3 files changed, 11 insertions(+), 10 deletions(-)
migration/migration.c +0 -10
@@ -1164,16 +1164,6 @@ void migrate_set_state(int *state, int old_state, int new_state) } } -static void block_cleanup_parameters (MigrationState *s) -{ -if (s->must_remove_block_options) { -/* setting to false can never fail */ -migrate_cap_set (MIGRATION_CAPABILITY_BLOCK , false, &error_abort); -migrate_set_block_incremental (false); - s->must_remove_block_options = false; - } -} -static void migrate_fd_cleanup (MigrationState *s) {qemu_bh_delete (s->cleanup_bh);
migration/options.c +10 -0
@@ -597,6 +597,16 @@ void migrate_set_block_incremental(bool value)/* parameters helpers */ +void block_cleanup_parameters (MigrationState *s) +{ +if (s->must_remove_block_options) { +/* setting to false can never fail */ +migrate_cap_set (MIGRATION_CAPABILITY_BLOCK , false, &error_abort); +migrate_set_block_incremental (false); + s->must_remove_block_options = false; + } +} +AnnounceParameters *migrate_announce_params (void ) {static AnnounceParameters ap;
migration/options.h +1 -0
@@ -90,5 +90,6 @@ void migrate_set_block_incremental(bool value);bool migrate_params_check (MigrationParameters *params,Error **errp);void migrate_params_init (MigrationParameters *params); +void block_cleanup_parameters (MigrationState *s);#endif
Signature · 1 line
2.39.2
Re: [PATCH v3 07/13] migration: Move block_cleanup_parameters() to options.c
Quoted 1 line · Juan Quintela
Signed-off-by Juan Quintela<[email protected]>
Signature · 2 lines
Best regards, Vladimir
PATCH v3 8/13 migration: Remove MigrationState from block_cleanup_parameters()
In reply to Juan QuintelaThis makes the function more regular with everything else.
--- migration/migration.c | 4 ++-- migration/options.c | 4 +++- migration/options.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-)
migration/migration.c +2 -2
@@ -1218,7 +1218,7 @@ static void migrate_fd_cleanup(MigrationState *s)error_report_err (error_copy (s->error)); }notifier_list_notify (&migration_state_notifiers, s); -block_cleanup_parameters (s); +block_cleanup_parameters ();yank_unregister_instance (MIGRATION_YANK_INSTANCE ); }
@@ -1712,7 +1712,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, "a valid migration protocol");migrate_set_state (&s->state,MIGRATION_STATUS_SETUP ,MIGRATION_STATUS_FAILED ); -block_cleanup_parameters (s); +block_cleanup_parameters ();return ; }
migration/options.c +3 -1
@@ -597,8 +597,10 @@ void migrate_set_block_incremental(bool value)/* parameters helpers */ -void block_cleanup_parameters (MigrationState *s) +void block_cleanup_parameters (void ) { +MigrationState *s =migrate_get_current (); +if (s->must_remove_block_options) {/* setting to false can never fail */ migrate_cap_set (MIGRATION_CAPABILITY_BLOCK , false, &error_abort);
migration/options.h +1 -1
@@ -90,6 +90,6 @@ void migrate_set_block_incremental(bool value);bool migrate_params_check (MigrationParameters *params,Error **errp);void migrate_params_init (MigrationParameters *params); -void block_cleanup_parameters (MigrationState *s); +void block_cleanup_parameters (void );#endif
Signature · 1 line
2.39.2
Re: [PATCH v3 08/13] migration: Remove MigrationState from block_cleanup_parameters()
Quoted 3 lines · Juan Quintela
This makes the function more regular with everything else.
Signed-off-by Juan Quintela <[email protected]>
Quoted 49 lines
--- migration/migration.c | 4 ++-- migration/options.c | 4 +++- migration/options.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-)migration/migration.c +2
-2@@ -1218,7 +1218,7 @@ static void migrate_fd_cleanup(MigrationState *s)error_report_err (error_copy (s->error)); }notifier_list_notify (&migration_state_notifiers, s); -block_cleanup_parameters (s); +block_cleanup_parameters ();yank_unregister_instance (MIGRATION_YANK_INSTANCE ); }@@ -1712,7 +1712,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, "a valid migration protocol");migrate_set_state (&s->state,MIGRATION_STATUS_SETUP ,MIGRATION_STATUS_FAILED ); -block_cleanup_parameters (s); +block_cleanup_parameters ();return ; }migration/options.c +3
-1@@ -597,8 +597,10 @@ void migrate_set_block_incremental(bool value)/* parameters helpers */ -void block_cleanup_parameters (MigrationState *s) +void block_cleanup_parameters (void ) { +MigrationState *s =migrate_get_current (); +if (s->must_remove_block_options) {/* setting to false can never fail */ migrate_cap_set (MIGRATION_CAPABILITY_BLOCK , false, &error_abort);migration/options.h +0
-0
migration/options.h void migrate_set_block_incremental(bool value); · line 93
Quoted 5 lines
migration/options.h +1
-1@@ -90,6 +90,6 @@ void migrate_set_block_incremental(bool value);bool migrate_params_check (MigrationParameters *params,Error **errp);void migrate_params_init (MigrationParameters *params); -void block_cleanup_parameters (MigrationState *s); +void block_cleanup_parameters (void );
Don't you want to rename it to migrate_* ?
Signature · 2 lines
Best regards, Vladimir
Re: [PATCH v3 08/13] migration: Remove MigrationState from block_cleanup_parameters()
Quoted 5 lines · Vladimir Sementsov-Ogievskiy
Quoted 2 lines · Juan Quintela
This makes the function more regular with everything else.
Signed-off-by Juan Quintela <[email protected]>Reviewed-by Vladimir Sementsov-Ogievskiy <[email protected]>
Thanks.
Quoted 44 lines
Quoted 44 lines
--- migration/migration.c | 4 ++-- migration/options.c | 4 +++- migration/options.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-)migration/migration.c +1
-1@@ -1218,7 +1218,7 @@ static void migrate_fd_cleanup(MigrationState *s)error_report_err (error_copy (s->error)); }notifier_list_notify (&migration_state_notifiers, s); -block_cleanup_parameters (s); +block_cleanup_parameters ();yank_unregister_instance (MIGRATION_YANK_INSTANCE ); } @@ -1712,7 +1712,7 @@ void qmp_migrate(const char *uri, bool
has_blk, bool blk,"a valid migration protocol"); migrate_set_state(&s->state, MIGRATION_STATUS_SETUP, MIGRATION_STATUS_FAILED);migration/migration.c +1
-1-block_cleanup_parameters (s); +block_cleanup_parameters ();return ; } diff --git a/migration/options.c b/migration/options.cindex
26fe00799b..f65b7babef100644migration/options.c +3
-0@@ -597,8 +597,10 @@ void migrate_set_block_incremental(bool value)/* parameters helpers */ -void block_cleanup_parameters(MigrationState *s) +void block_cleanup_parameters (void ) { +MigrationState *s =migrate_get_current (); +if (s->must_remove_block_options) {/* setting to false can never fail */ migrate_cap_set (MIGRATION_CAPABILITY_BLOCK , false, &error_abort);migration/options.h +0
-0
Quoted 8 lines
migration/options.h void migrate_set_block_incremental(bool value); · line 93
Quoted 6 lines
migration/options.h +1
-1@@ -90,6 +90,6 @@ void migrate_set_block_incremental(bool value);bool migrate_params_check (MigrationParameters *params,Error **errp);void migrate_params_init (MigrationParameters *params); -void block_cleanup_parameters (MigrationState *s); +void block_cleanup_parameters (void );Don't you want to rename it to migrate_* ?
The idea is to deprecate block migration. There are much better things on the block layer to migrate disks. So I think we can let it from now there.
Later, Juan.
PATCH v3 9/13 migration: Create migrate_tls_creds() function
In reply to Juan Quintela--- migration/options.c | 7 +++++++ migration/options.h | 1 + migration/tls.c | 9 ++++----- 3 files changed, 12 insertions(+), 5 deletions(-)
migration/options.c +7 -0
@@ -579,6 +579,13 @@ uint8_t migrate_throttle_trigger_threshold(void)return s->parameters.throttle_trigger_threshold; } +char *migrate_tls_creds (void ) +{ +MigrationState *s =migrate_get_current (); + +return s->parameters.tls_creds; +} +uint64_t migrate_xbzrle_cache_size (void ) {MigrationState *s =migrate_get_current ();
migration/options.h +1 -0
@@ -80,6 +80,7 @@ MultiFDCompression migrate_multifd_compression(void);int migrate_multifd_zlib_level (void );int migrate_multifd_zstd_level (void );uint8_t migrate_throttle_trigger_threshold (void ); +char *migrate_tls_creds (void );uint64_t migrate_xbzrle_cache_size (void );/* parameters setters */
migration/tls.c +4 -5
@@ -34,20 +34,19 @@ migration_tls_get_creds(MigrationState *s, Error **errp) {Object *creds; +char *tls_creds =migrate_tls_creds ();QCryptoTLSCreds *ret; - creds =object_resolve_path_component ( -object_get_objects_root (), s->parameters.tls_creds); + creds =object_resolve_path_component (object_get_objects_root (), tls_creds);if (!creds) { -error_setg (errp,"No TLS credentials with id '%s'" , - s->parameters.tls_creds); +error_setg (errp,"No TLS credentials with id '%s'" , tls_creds);return NULL ; } ret = (QCryptoTLSCreds *)object_dynamic_cast ( creds,TYPE_QCRYPTO_TLS_CREDS );if (!ret) {error_setg (errp,"Object with id '%s' is not TLS credentials" , - s->parameters.tls_creds); + tls_creds);return NULL ; }if (!qcrypto_tls_creds_check_endpoint (ret, endpoint, errp)) {
Signature · 1 line
2.39.2
Re: [PATCH v3 09/13] migration: Create migrate_tls_creds() function
Quoted 1 line · Juan Quintela
Signed-off-by Juan Quintela <[email protected]>
Quoted 11 lines
--- migration/options.c | 7 +++++++ migration/options.h | 1 + migration/tls.c | 9 ++++----- 3 files changed, 12 insertions(+), 5 deletions(-)migration/options.c +0
-0
migration/options.c uint8_t migrate_throttle_trigger_threshold(void) · line 582
Quoted 4 lines
migration/options.c +1
-0@@ -579,6 +579,13 @@ uint8_t migrate_throttle_trigger_threshold(void)return s->parameters.throttle_trigger_threshold; } +char *migrate_tls_creds (void )
could be stricter "const char *"
Quoted 26 lines
migration/options.c +6
-0+{ +MigrationState *s =migrate_get_current (); + +return s->parameters.tls_creds; +} +uint64_t migrate_xbzrle_cache_size (void ) {MigrationState *s =migrate_get_current ();migration/options.h +1
-0@@ -80,6 +80,7 @@ MultiFDCompression migrate_multifd_compression(void);int migrate_multifd_zlib_level (void );int migrate_multifd_zstd_level (void );uint8_t migrate_throttle_trigger_threshold (void ); +char *migrate_tls_creds (void );uint64_t migrate_xbzrle_cache_size (void );/* parameters setters */ migration/tls.c +0
-0
migration/tls.c migration_tls_get_creds(MigrationState *s, · line 34
Quoted 1 line
migration/tls.c +0
-0@@ -34,20 +34,19 @@ migration_tls_get_creds(MigrationState *s, Error **errp)
"s" argument becomes unused, may be dropped.
Quoted 23 lines
migration/tls.c +4
-5{Object *creds; +char *tls_creds =migrate_tls_creds ();QCryptoTLSCreds *ret; - creds =object_resolve_path_component ( -object_get_objects_root (), s->parameters.tls_creds); + creds =object_resolve_path_component (object_get_objects_root (), tls_creds);if (!creds) { -error_setg (errp,"No TLS credentials with id '%s'" , - s->parameters.tls_creds); +error_setg (errp,"No TLS credentials with id '%s'" , tls_creds);return NULL ; } ret = (QCryptoTLSCreds *)object_dynamic_cast ( creds,TYPE_QCRYPTO_TLS_CREDS );if (!ret) {error_setg (errp,"Object with id '%s' is not TLS credentials" , - s->parameters.tls_creds); + tls_creds);return NULL ; }if (!qcrypto_tls_creds_check_endpoint (ret, endpoint, errp)) {
Signature · 2 lines
Best regards, Vladimir
Re: [PATCH v3 09/13] migration: Create migrate_tls_creds() function
Quoted 6 lines · Vladimir Sementsov-Ogievskiy
Quoted 1 line · Juan Quintela
Signed-off-by Juan Quintela <[email protected]>Reviewed-by Vladimir Sementsov-Ogievskiy <[email protected]>could be stricter "const char *"
I change changed the patch just to reflect this.
Quoted 5 lines
migration/tls.c migration_tls_get_creds(MigrationState *s, · line 34
Quoted 3 lines
migration/tls.c +0
-0@@ -34,20 +34,19 @@ migration_tls_get_creds(MigrationState *s, Error **errp)"s" argument becomes unused, may be dropped.
Good catch!
I created the patches for this, will send after I send the PULL request.
Thanks, Juan.
PATCH v3 10/13 migration: Create migrate_tls_authz() function
In reply to Juan Quintela--- migration/options.c | 7 +++++++ migration/options.h | 1 + migration/tls.c | 5 +---- 3 files changed, 9 insertions(+), 4 deletions(-)
migration/options.c +7 -0
@@ -579,6 +579,13 @@ uint8_t migrate_throttle_trigger_threshold(void)return s->parameters.throttle_trigger_threshold; } +char *migrate_tls_authz (void ) +{ +MigrationState *s =migrate_get_current (); + +return s->parameters.tls_authz; +} +char *migrate_tls_creds (void ) {MigrationState *s =migrate_get_current ();
migration/options.h +1 -0
@@ -80,6 +80,7 @@ MultiFDCompression migrate_multifd_compression(void);int migrate_multifd_zlib_level (void );int migrate_multifd_zstd_level (void );uint8_t migrate_throttle_trigger_threshold (void ); +char *migrate_tls_authz (void );char *migrate_tls_creds (void );uint64_t migrate_xbzrle_cache_size (void );
migration/tls.c +1 -4
@@ -86,10 +86,7 @@ void migration_tls_channel_process_incoming(MigrationState *s,return ; } - tioc =qio_channel_tls_new_server ( - ioc, creds, - s->parameters.tls_authz, - errp); + tioc =qio_channel_tls_new_server (ioc, creds,migrate_tls_authz (), errp);if (!tioc) {return ; }
Signature · 1 line
2.39.2
Re: [PATCH v3 10/13] migration: Create migrate_tls_authz() function
Quoted 1 line · Juan Quintela
Signed-off-by Juan Quintela<[email protected]>
Still same recommendations: "const char *" and "s" becomes unused in migration_tls_channel_process_incoming()
Signature · 2 lines
Best regards, Vladimir
PATCH v3 11/13 migration: Create migrate_tls_hostname() function
In reply to Juan Quintela--- migration/options.c | 7 +++++++ migration/options.h | 1 + migration/tls.c | 6 ++++-- 3 files changed, 12 insertions(+), 2 deletions(-)
migration/options.c +7 -0
@@ -593,6 +593,13 @@ char *migrate_tls_creds(void)return s->parameters.tls_creds; } +char *migrate_tls_hostname (void ) +{ +MigrationState *s =migrate_get_current (); + +return s->parameters.tls_hostname; +} +uint64_t migrate_xbzrle_cache_size (void ) {MigrationState *s =migrate_get_current ();
migration/options.h +1 -0
@@ -82,6 +82,7 @@ int migrate_multifd_zstd_level(void);uint8_t migrate_throttle_trigger_threshold (void );char *migrate_tls_authz (void );char *migrate_tls_creds (void ); +char *migrate_tls_hostname (void );uint64_t migrate_xbzrle_cache_size (void );/* parameters setters */
migration/tls.c +4 -2
@@ -123,6 +123,7 @@ QIOChannelTLS *migration_tls_client_create(MigrationState *s, Error **errp) {QCryptoTLSCreds *creds; +char *tls_hostname; creds =migration_tls_get_creds ( s,QCRYPTO_TLS_CREDS_ENDPOINT_CLIENT , errp);
@@ -130,8 +131,9 @@ QIOChannelTLS *migration_tls_client_create(MigrationState *s,return NULL ; } -if (s->parameters.tls_hostname && *s->parameters.tls_hostname) { - hostname = s->parameters.tls_hostname; + tls_hostname =migrate_tls_hostname (); +if (tls_hostname && *tls_hostname) { + hostname = tls_hostname; }return qio_channel_tls_new_client (ioc, creds, hostname, errp);
Signature · 1 line
2.39.2
Re: [PATCH v3 11/13] migration: Create migrate_tls_hostname() function
Quoted 1 line · Juan Quintela
Signed-off-by Juan Quintela<[email protected]>
[same recommendations]
Signature · 2 lines
Best regards, Vladimir
PATCH v3 12/13 migration: Create migrate_block_bitmap_mapping() function
In reply to Juan QuintelaNotice that we changed the test of ->has_block_bitmap_mapping for the test that block_bitmap_mapping is not NULL.
--- migration/block-dirty-bitmap.c | 14 ++++++++------ migration/options.c | 7 +++++++ migration/options.h | 1 + 3 files changed, 16 insertions(+), 6 deletions(-)
migration/block-dirty-bitmap.c +8 -6
@@ -605,11 +605,12 @@ static int init_dirty_bitmap_migration(DBMSaveState *s)SaveBitmapState *dbms;GHashTable *handled_by_blk =g_hash_table_new (NULL ,NULL );BlockBackend *blk; -const MigrationParameters *mig_params = &migrate_get_current ()->parameters;GHashTable *alias_map =NULL ; +BitmapMigrationNodeAliasList *block_bitmap_mapping = +migrate_block_bitmap_mapping (); -if (mig_params->has_block_bitmap_mapping) { - alias_map =construct_alias_map (mig_params->block_bitmap_mapping, true, +if (block_bitmap_mapping) { + alias_map =construct_alias_map (block_bitmap_mapping, true, &error_abort); }
@@ -1158,7 +1159,8 @@ static int dirty_bitmap_load_header(QEMUFile *f, DBMLoadState *s,static int dirty_bitmap_load (QEMUFile *f,void *opaque,int version_id) {GHashTable *alias_map =NULL ; -const MigrationParameters *mig_params = &migrate_get_current ()->parameters; +BitmapMigrationNodeAliasList *block_bitmap_mapping = +migrate_block_bitmap_mapping ();DBMLoadState *s = &((DBMState *)opaque)->load;int ret =0 ;
@@ -1170,8 +1172,8 @@ static int dirty_bitmap_load(QEMUFile *f, void *opaque, int version_id)return -EINVAL ; } -if (mig_params->has_block_bitmap_mapping) { - alias_map =construct_alias_map (mig_params->block_bitmap_mapping, +if (block_bitmap_mapping) { + alias_map =construct_alias_map (block_bitmap_mapping, false, &error_abort); }
migration/options.c +7 -0
@@ -452,6 +452,13 @@ void qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params,/* parameters */ +BitmapMigrationNodeAliasList *migrate_block_bitmap_mapping (void ) +{ +MigrationState *s =migrate_get_current (); + +return s->parameters.block_bitmap_mapping; +} +bool migrate_block_incremental (void ) {MigrationState *s =migrate_get_current ();
migration/options.h +1 -0
@@ -62,6 +62,7 @@ bool migrate_cap_set(int cap, bool value, Error **errp);/* parameters */ +BitmapMigrationNodeAliasList *migrate_block_bitmap_mapping (void );bool migrate_block_incremental (void );uint32_t migrate_checkpoint_delay (void );int migrate_compress_level (void );
Signature · 1 line
2.39.2
Re: [PATCH v3 12/13] migration: Create migrate_block_bitmap_mapping() function
Quoted 4 lines · Juan Quintela
Notice that we changed the test of ->has_block_bitmap_mapping for the test that
block_bitmap_mappingis not NULL.Signed-off-by Juan Quintela <[email protected]>
Quoted 52 lines
--- migration/block-dirty-bitmap.c | 14 ++++++++------ migration/options.c | 7 +++++++ migration/options.h | 1 + 3 files changed, 16 insertions(+), 6 deletions(-)migration/block-dirty-bitmap.c +8
-6@@ -605,11 +605,12 @@ static int init_dirty_bitmap_migration(DBMSaveState *s)SaveBitmapState *dbms;GHashTable *handled_by_blk =g_hash_table_new (NULL ,NULL );BlockBackend *blk; -const MigrationParameters *mig_params = &migrate_get_current ()->parameters;GHashTable *alias_map =NULL ; +BitmapMigrationNodeAliasList *block_bitmap_mapping = +migrate_block_bitmap_mapping (); -if (mig_params->has_block_bitmap_mapping) { - alias_map =construct_alias_map (mig_params->block_bitmap_mapping, true, +if (block_bitmap_mapping) { + alias_map =construct_alias_map (block_bitmap_mapping, true, &error_abort); }@@ -1158,7 +1159,8 @@ static int dirty_bitmap_load_header(QEMUFile *f, DBMLoadState *s,static int dirty_bitmap_load (QEMUFile *f,void *opaque,int version_id) {GHashTable *alias_map =NULL ; -const MigrationParameters *mig_params = &migrate_get_current ()->parameters; +BitmapMigrationNodeAliasList *block_bitmap_mapping = +migrate_block_bitmap_mapping ();DBMLoadState *s = &((DBMState *)opaque)->load;int ret =0 ;@@ -1170,8 +1172,8 @@ static int dirty_bitmap_load(QEMUFile *f, void *opaque, int version_id)return -EINVAL ; } -if (mig_params->has_block_bitmap_mapping) { - alias_map =construct_alias_map (mig_params->block_bitmap_mapping, +if (block_bitmap_mapping) { + alias_map =construct_alias_map (block_bitmap_mapping, false, &error_abort); }migration/options.c +0
-0
migration/options.c void qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params, · line 455
Quoted 4 lines
migration/options.c +1
-0@@ -452,6 +452,13 @@ void qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params,/* parameters */ +BitmapMigrationNodeAliasList *migrate_block_bitmap_mapping (void )
as well, this could return constant pointer. Even construct_alias_map() is already prepared for this.
Quoted 21 lines
migration/options.c +6
-0+{ +MigrationState *s =migrate_get_current (); + +return s->parameters.block_bitmap_mapping; +} +bool migrate_block_incremental (void ) {MigrationState *s =migrate_get_current ();migration/options.h +1
-0@@ -62,6 +62,7 @@ bool migrate_cap_set(int cap, bool value, Error **errp);/* parameters */ +BitmapMigrationNodeAliasList *migrate_block_bitmap_mapping (void );bool migrate_block_incremental (void );uint32_t migrate_checkpoint_delay (void );int migrate_compress_level (void );
Signature · 2 lines
Best regards, Vladimir
PATCH v3 13/13 migration: Move migration_properties to options.c
In reply to Juan Quintela--- migration/migration.c | 157 ------------------------------------------ migration/options.c | 155 +++++++++++++++++++++++++++++++++++++++++ migration/options.h | 7 ++ 3 files changed, 162 insertions(+), 157 deletions(-)
migration/migration.c +0 -157
@@ -52,8 +52,6 @@#include "io/channel-tls.h" #include "migration/colo.h" #include "hw/boards.h" -#include "hw/qdev-properties.h" -#include "hw/qdev-properties-system.h" #include "monitor/monitor.h" #include "net/announce.h" #include "qemu/queue.h"
@@ -65,51 +63,6 @@#include "sysemu/qtest.h" #include "options.h" -#define MAX_THROTTLE (128 << 20)/* Migration transfer speed throttling */ - -/* Time in milliseconds we are allowed to stop the source, -* for sending the last part */ -#define DEFAULT_MIGRATE_SET_DOWNTIME 300 - -/* Default compression thread count */ -#define DEFAULT_MIGRATE_COMPRESS_THREAD_COUNT 8 -/* Default decompression thread count, usually decompression is at -* least 4 times as fast as compression.*/ -#define DEFAULT_MIGRATE_DECOMPRESS_THREAD_COUNT 2 -/*0: means nocompress, 1: best speed, ... 9: best compress ratio */ -#define DEFAULT_MIGRATE_COMPRESS_LEVEL 1 -/* Define default autoconverge cpu throttle migration parameters */ -#define DEFAULT_MIGRATE_THROTTLE_TRIGGER_THRESHOLD 50 -#define DEFAULT_MIGRATE_CPU_THROTTLE_INITIAL 20 -#define DEFAULT_MIGRATE_CPU_THROTTLE_INCREMENT 10 -#define DEFAULT_MIGRATE_MAX_CPU_THROTTLE 99 - -/* Migration XBZRLE default cache size */ -#define DEFAULT_MIGRATE_XBZRLE_CACHE_SIZE (64 * 1024 * 1024) - -/* The delay time (in ms) between two COLO checkpoints */ -#define DEFAULT_MIGRATE_X_CHECKPOINT_DELAY (200 * 100) -#define DEFAULT_MIGRATE_MULTIFD_CHANNELS 2 -#define DEFAULT_MIGRATE_MULTIFD_COMPRESSION MULTIFD_COMPRESSION_NONE -/* 0: means nocompress, 1: best speed, ... 9: best compress ratio */ -#define DEFAULT_MIGRATE_MULTIFD_ZLIB_LEVEL 1 -/* 0: means nocompress, 1: best speed, ... 20: best compress ratio */ -#define DEFAULT_MIGRATE_MULTIFD_ZSTD_LEVEL 1 - -/* Background transfer rate for postcopy, 0 means unlimited, note -* that page requests can still exceed this limit. -*/ -#define DEFAULT_MIGRATE_MAX_POSTCOPY_BANDWIDTH 0 - -/* -* Parameters for self_announce_delay giving a stream of RARP/ARP -* packets after migration. -*/ -#define DEFAULT_MIGRATE_ANNOUNCE_INITIAL 50 -#define DEFAULT_MIGRATE_ANNOUNCE_MAX 550 -#define DEFAULT_MIGRATE_ANNOUNCE_ROUNDS 5 -#define DEFAULT_MIGRATE_ANNOUNCE_STEP 100 -static NotifierList migration_state_notifiers =NOTIFIER_LIST_INITIALIZER (migration_state_notifiers);
@@ -3317,116 +3270,6 @@ void migrate_fd_connect(MigrationState *s, Error *error_in) s->migration_thread_running = true; } -#define DEFINE_PROP_MIG_CAP (name, x) \ - DEFINE_PROP_BOOL(name, MigrationState, capabilities[x], false) - -static Property migration_properties[] = { -DEFINE_PROP_BOOL ("store-global-state" , MigrationState, - store_global_state, true), -DEFINE_PROP_BOOL ("send-configuration" , MigrationState, - send_configuration, true), -DEFINE_PROP_BOOL ("send-section-footer" , MigrationState, - send_section_footer, true), -DEFINE_PROP_BOOL ("decompress-error-check" , MigrationState, - decompress_error_check, true), -DEFINE_PROP_UINT8 ("x-clear-bitmap-shift" , MigrationState, - clear_bitmap_shift,CLEAR_BITMAP_SHIFT_DEFAULT ), -DEFINE_PROP_BOOL ("x-preempt-pre-7-2" , MigrationState, - preempt_pre_7_2, false), - -/* Migration parameters */ -DEFINE_PROP_UINT8 ("x-compress-level" , MigrationState, - parameters.compress_level, -DEFAULT_MIGRATE_COMPRESS_LEVEL ), -DEFINE_PROP_UINT8 ("x-compress-threads" , MigrationState, - parameters.compress_threads, -DEFAULT_MIGRATE_COMPRESS_THREAD_COUNT ), -DEFINE_PROP_BOOL ("x-compress-wait-thread" , MigrationState, - parameters.compress_wait_thread, true), -DEFINE_PROP_UINT8 ("x-decompress-threads" , MigrationState, - parameters.decompress_threads, -DEFAULT_MIGRATE_DECOMPRESS_THREAD_COUNT ), -DEFINE_PROP_UINT8 ("x-throttle-trigger-threshold" , MigrationState, - parameters.throttle_trigger_threshold, -DEFAULT_MIGRATE_THROTTLE_TRIGGER_THRESHOLD ), -DEFINE_PROP_UINT8 ("x-cpu-throttle-initial" , MigrationState, - parameters.cpu_throttle_initial, -DEFAULT_MIGRATE_CPU_THROTTLE_INITIAL ), -DEFINE_PROP_UINT8 ("x-cpu-throttle-increment" , MigrationState, - parameters.cpu_throttle_increment, -DEFAULT_MIGRATE_CPU_THROTTLE_INCREMENT ), -DEFINE_PROP_BOOL ("x-cpu-throttle-tailslow" , MigrationState, - parameters.cpu_throttle_tailslow, false), -DEFINE_PROP_SIZE ("x-max-bandwidth" , MigrationState, - parameters.max_bandwidth,MAX_THROTTLE ), -DEFINE_PROP_UINT64 ("x-downtime-limit" , MigrationState, - parameters.downtime_limit, -DEFAULT_MIGRATE_SET_DOWNTIME ), -DEFINE_PROP_UINT32 ("x-checkpoint-delay" , MigrationState, - parameters.x_checkpoint_delay, -DEFAULT_MIGRATE_X_CHECKPOINT_DELAY ), -DEFINE_PROP_UINT8 ("multifd-channels" , MigrationState, - parameters.multifd_channels, -DEFAULT_MIGRATE_MULTIFD_CHANNELS ), -DEFINE_PROP_MULTIFD_COMPRESSION ("multifd-compression" , MigrationState, - parameters.multifd_compression, -DEFAULT_MIGRATE_MULTIFD_COMPRESSION ), -DEFINE_PROP_UINT8 ("multifd-zlib-level" , MigrationState, - parameters.multifd_zlib_level, -DEFAULT_MIGRATE_MULTIFD_ZLIB_LEVEL ), -DEFINE_PROP_UINT8 ("multifd-zstd-level" , MigrationState, - parameters.multifd_zstd_level, -DEFAULT_MIGRATE_MULTIFD_ZSTD_LEVEL ), -DEFINE_PROP_SIZE ("xbzrle-cache-size" , MigrationState, - parameters.xbzrle_cache_size, -DEFAULT_MIGRATE_XBZRLE_CACHE_SIZE ), -DEFINE_PROP_SIZE ("max-postcopy-bandwidth" , MigrationState, - parameters.max_postcopy_bandwidth, -DEFAULT_MIGRATE_MAX_POSTCOPY_BANDWIDTH ), -DEFINE_PROP_UINT8 ("max-cpu-throttle" , MigrationState, - parameters.max_cpu_throttle, -DEFAULT_MIGRATE_MAX_CPU_THROTTLE ), -DEFINE_PROP_SIZE ("announce-initial" , MigrationState, - parameters.announce_initial, -DEFAULT_MIGRATE_ANNOUNCE_INITIAL ), -DEFINE_PROP_SIZE ("announce-max" , MigrationState, - parameters.announce_max, -DEFAULT_MIGRATE_ANNOUNCE_MAX ), -DEFINE_PROP_SIZE ("announce-rounds" , MigrationState, - parameters.announce_rounds, -DEFAULT_MIGRATE_ANNOUNCE_ROUNDS ), -DEFINE_PROP_SIZE ("announce-step" , MigrationState, - parameters.announce_step, -DEFAULT_MIGRATE_ANNOUNCE_STEP ), -DEFINE_PROP_STRING ("tls-creds" , MigrationState, parameters.tls_creds), -DEFINE_PROP_STRING ("tls-hostname" , MigrationState, parameters.tls_hostname), -DEFINE_PROP_STRING ("tls-authz" , MigrationState, parameters.tls_authz), - -/* Migration capabilities */ -DEFINE_PROP_MIG_CAP ("x-xbzrle" ,MIGRATION_CAPABILITY_XBZRLE ), -DEFINE_PROP_MIG_CAP ("x-rdma-pin-all" ,MIGRATION_CAPABILITY_RDMA_PIN_ALL ), -DEFINE_PROP_MIG_CAP ("x-auto-converge" ,MIGRATION_CAPABILITY_AUTO_CONVERGE ), -DEFINE_PROP_MIG_CAP ("x-zero-blocks" ,MIGRATION_CAPABILITY_ZERO_BLOCKS ), -DEFINE_PROP_MIG_CAP ("x-compress" ,MIGRATION_CAPABILITY_COMPRESS ), -DEFINE_PROP_MIG_CAP ("x-events" ,MIGRATION_CAPABILITY_EVENTS ), -DEFINE_PROP_MIG_CAP ("x-postcopy-ram" ,MIGRATION_CAPABILITY_POSTCOPY_RAM ), -DEFINE_PROP_MIG_CAP ("x-postcopy-preempt" , -MIGRATION_CAPABILITY_POSTCOPY_PREEMPT ), -DEFINE_PROP_MIG_CAP ("x-colo" ,MIGRATION_CAPABILITY_X_COLO ), -DEFINE_PROP_MIG_CAP ("x-release-ram" ,MIGRATION_CAPABILITY_RELEASE_RAM ), -DEFINE_PROP_MIG_CAP ("x-block" ,MIGRATION_CAPABILITY_BLOCK ), -DEFINE_PROP_MIG_CAP ("x-return-path" ,MIGRATION_CAPABILITY_RETURN_PATH ), -DEFINE_PROP_MIG_CAP ("x-multifd" ,MIGRATION_CAPABILITY_MULTIFD ), -DEFINE_PROP_MIG_CAP ("x-background-snapshot" , -MIGRATION_CAPABILITY_BACKGROUND_SNAPSHOT ), -#ifdef CONFIG_LINUX -DEFINE_PROP_MIG_CAP ("x-zero-copy-send" , -MIGRATION_CAPABILITY_ZERO_COPY_SEND ), -#endif - -DEFINE_PROP_END_OF_LIST (), -}; -static void migration_class_init (ObjectClass *klass,void *data) {DeviceClass *dc =DEVICE_CLASS (klass);
migration/options.c +155 -0
161 lines not on this page · raw message
migration/options.h +7 -0
@@ -14,6 +14,9 @@#ifndef QEMU_MIGRATION_OPTIONS_H #define QEMU_MIGRATION_OPTIONS_H +#include "hw/qdev-properties.h" +#include "hw/qdev-properties-system.h" +/* constants */ /* Amount of time to allocate to each "chunk" of bandwidth-throttled
@@ -21,6 +24,10 @@#define BUFFER_DELAY 100#define XFER_LIMIT_RATIO (1000 / BUFFER_DELAY) +/* migration properties */ + +extern Property migration_properties[]; +/* capabilities */ bool migrate_auto_converge (void );
Signature · 1 line
2.39.2
Re: [PATCH v3 13/13] migration: Move migration_properties to options.c
Quoted 1 line · Juan Quintela
Signed-off-by Juan Quintela<[email protected]>
Signature · 2 lines
Best regards, Vladimir