All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org, "Daniel P. Berrangé" <berrange@redhat.com>,
	"Fam Zheng" <fam@euphon.net>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	libvir-list@redhat.com, "Fabiano Rosas" <farosas@suse.de>,
	qemu-block@nongnu.org, "Peter Xu" <peterx@redhat.com>,
	"Leonardo Bras" <leobras@redhat.com>,
	"Dr. David Alan Gilbert" <dave@treblig.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Hailiang Zhang" <zhanghailiang@xfusion.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v4 03/10] migration: migrate 'inc' command option is deprecated.
Date: Fri, 13 Oct 2023 15:09:23 +0200	[thread overview]
Message-ID: <8734yehdoc.fsf@pond.sub.org> (raw)
In-Reply-To: <20231013104736.31722-4-quintela@redhat.com> (Juan Quintela's message of "Fri, 13 Oct 2023 12:47:29 +0200")

Juan Quintela <quintela@redhat.com> writes:

> Set the 'block_incremental' migration parameter to 'true' instead.
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
>
> ---
>
> Improve documentation and style (thanks Markus)
> ---
>  docs/about/deprecated.rst | 7 +++++++
>  qapi/migration.json       | 8 +++++++-
>  migration/migration.c     | 6 ++++++
>  3 files changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index 1c4d7f36f0..1b6b2870cf 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -452,3 +452,10 @@ Migration
>  ``skipped`` field in Migration stats has been deprecated.  It hasn't
>  been used for more than 10 years.
>  
> +``inc`` migrate command option (since 8.2)
> +''''''''''''''''''''''''''''''''''''''''''
> +
> +The new way to modify migration is using migration parameters.
> +``inc`` functionality can be achieved by setting the
> +``block-incremental`` migration parameter to ``true``.
> +
> diff --git a/qapi/migration.json b/qapi/migration.json
> index 6865fea3c5..56bbd55b87 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -1492,6 +1492,11 @@
>  #
>  # @resume: resume one paused migration, default "off". (since 3.0)
>  #
> +# Features:
> +#
> +# @deprecated: Member @inc is deprecated.  Use migration parameter
> +#     @block-incremental instead.

This is fine now.  It becomes bad advice in PATCH 05, which deprecates
@block-incremental.  Two solutions:

1. Change this patch to point to an alternative that will *not* be
deprecated.

2. Change PATCH 05.

Same end result.

> +#
>  # Returns: nothing on success
>  #
>  # Since: 0.14
> @@ -1513,7 +1518,8 @@
>  # <- { "return": {} }
>  ##
>  { 'command': 'migrate',
> -  'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
> +  'data': {'uri': 'str', '*blk': 'bool',
> +           '*inc': { 'type': 'bool', 'features': [ 'deprecated' ] },
>             '*detach': 'bool', '*resume': 'bool' } }
>  
>  ##
> diff --git a/migration/migration.c b/migration/migration.c
> index 1c6c81ad49..ac4897fe0d 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -1601,6 +1601,12 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc,
>  {
>      Error *local_err = NULL;
>  
> +    if (blk_inc) {
> +        warn_report("@inc/-i migrate option is deprecated, set the"

This is either about QMP migrate's parameter "inc", or HMP migrate's
flags -i.

In the former case, we want something like "parameter 'inc' is
deprecated".

In the latter case, we want something like "-i is deprecated".

Trying to do both in a single message results in a sub-par message.  If
you want to do better, you have to check in hmp_migrate(), too.  Then
hmp_migrate can refer to "-i", and migrate_prepare() to "parameter
'inc'".  Up to you.

If you decide a single message is good enough, use something like
"parameter 'inc' / flag -i is deprecated".

> +                    "'block-incremental' migration parameter to 'true'"
> +                    " instead.");

Again, fine now, becomes bad advice in PATCH 05.

> +    }
> +
>      if (resume) {
>          if (s->state != MIGRATION_STATUS_POSTCOPY_PAUSED) {
>              error_setg(errp, "Cannot resume if there is no "



  reply	other threads:[~2023-10-13 13:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13 10:47 [PATCH v4 00/10] Migration deprecated parts Juan Quintela
2023-10-13 10:47 ` [PATCH v4 01/10] migration: Improve json and formatting Juan Quintela
2023-10-13 12:48   ` Markus Armbruster
2023-10-13 10:47 ` [PATCH v4 02/10] migration: Print block status when needed Juan Quintela
2023-10-13 10:47 ` [PATCH v4 03/10] migration: migrate 'inc' command option is deprecated Juan Quintela
2023-10-13 13:09   ` Markus Armbruster [this message]
2023-10-16  7:00     ` Juan Quintela
2023-10-16  9:42       ` Markus Armbruster
2023-10-16 13:28         ` Juan Quintela
2023-10-17  5:53           ` Markus Armbruster
2023-10-13 10:47 ` [PATCH v4 04/10] migration: migrate 'blk' " Juan Quintela
2023-10-13 13:11   ` Markus Armbruster
2023-10-13 10:47 ` [PATCH v4 05/10] migration: Deprecate block migration Juan Quintela
2023-10-13 10:47 ` [PATCH v4 06/10] migration: Deprecate old compression method Juan Quintela
2023-10-13 10:47 ` [PATCH v4 07/10] [RFC] migration: Make -i/-b an error for hmp and qmp Juan Quintela
2023-10-13 10:47 ` [PATCH v4 08/10] [RFC] migration: Remove helpers needed for -i/-b migrate options Juan Quintela
2023-10-13 10:47 ` [PATCH v4 09/10] [RFC] migration: Remove support for block_incremental Juan Quintela
2023-10-13 10:47 ` [PATCH v4 10/10] [RFC] migration: Remove block migration support Juan Quintela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8734yehdoc.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dave@treblig.org \
    --cc=eblake@redhat.com \
    --cc=fam@euphon.net \
    --cc=farosas@suse.de \
    --cc=leobras@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    --cc=zhanghailiang@xfusion.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.