[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 24/43] migration: Move migrate_announce_params() to option
From: |
Fabiano Rosas |
Subject: |
Re: [PATCH v2 24/43] migration: Move migrate_announce_params() to option.c |
Date: |
Thu, 20 Apr 2023 16:04:53 -0300 |
Juan Quintela <quintela@redhat.com> writes:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
> ---
> migration/migration.c | 14 --------------
> migration/options.c | 19 +++++++++++++++++++
> 2 files changed, 19 insertions(+), 14 deletions(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index dbb89c2e7b..2191437b15 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -954,20 +954,6 @@ MigrationParameters *qmp_query_migrate_parameters(Error
> **errp)
> return params;
> }
>
> -AnnounceParameters *migrate_announce_params(void)
> -{
> - static AnnounceParameters ap;
> -
> - MigrationState *s = migrate_get_current();
> -
> - ap.initial = s->parameters.announce_initial;
> - ap.max = s->parameters.announce_max;
> - ap.rounds = s->parameters.announce_rounds;
> - ap.step = s->parameters.announce_step;
> -
> - return ≈
> -}
> -
> /*
> * Return true if we're already in the middle of a migration
> * (i.e. any of the active or setup states)
> diff --git a/migration/options.c b/migration/options.c
> index 2cb04fbbd1..ed9d2a226f 100644
> --- a/migration/options.c
> +++ b/migration/options.c
> @@ -16,6 +16,7 @@
> #include "qapi/qapi-commands-migration.h"
> #include "qapi/qmp/qerror.h"
> #include "sysemu/runstate.h"
> +#include "migration/misc.h"
> #include "migration.h"
> #include "ram.h"
> #include "options.h"
> @@ -589,3 +590,21 @@ uint64_t migrate_xbzrle_cache_size(void)
>
> return s->parameters.xbzrle_cache_size;
> }
> +
> +/* parameters helpers */
> +
> +AnnounceParameters *migrate_announce_params(void)
> +{
> + static AnnounceParameters ap;
> +
> + MigrationState *s = migrate_get_current();
> +
> + ap.initial = s->parameters.announce_initial;
> + ap.max = s->parameters.announce_max;
> + ap.rounds = s->parameters.announce_rounds;
> + ap.step = s->parameters.announce_step;
> +
> + return ≈
> +}
> +
> +
Extra whitespace here^
- Re: [PATCH v2 22/43] migration: Create migrate_checkpoint_delay(), (continued)
- [PATCH v2 21/43] migration: Create migrate_throttle_trigger_threshold(), Juan Quintela, 2023/04/20
- [PATCH v2 23/43] migration: Create migrate_max_cpu_throttle(), Juan Quintela, 2023/04/20
- [PATCH v2 27/43] migration: Create migrate_cpu_throttle_tailslow() function, Juan Quintela, 2023/04/20
- [PATCH v2 26/43] migration: Create migrate_cpu_throttle_increment() function, Juan Quintela, 2023/04/20
- [PATCH v2 24/43] migration: Move migrate_announce_params() to option.c, Juan Quintela, 2023/04/20
- Re: [PATCH v2 24/43] migration: Move migrate_announce_params() to option.c,
Fabiano Rosas <=
- [PATCH v2 25/43] migration: Create migrate_cpu_throttle_initial() to option.c, Juan Quintela, 2023/04/20
- [PATCH v2 30/43] migration: Create migrate_max_bandwidth() function, Juan Quintela, 2023/04/20
- [PATCH v2 28/43] migration: Move migrate_use_tls() to options.c, Juan Quintela, 2023/04/20
- [PATCH v2 29/43] migration: Move migrate_postcopy() to options.c, Juan Quintela, 2023/04/20
- [PATCH v2 31/43] migration: Move qmp_query_migrate_parameters() to options.c, Juan Quintela, 2023/04/20