qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org,  libvir-list@redhat.com,
	 Leonardo Bras <leobras@redhat.com>,
	 Peter Xu <peterx@redhat.com>,  Fam Zheng <fam@euphon.net>,
	 Stefan Hajnoczi <stefanha@redhat.com>,
	 Eric Blake <eblake@redhat.com>,
	 qemu-block@nongnu.org,  Fabiano Rosas <farosas@suse.de>,
	 Thomas Huth <thuth@redhat.com>
Subject: Re: [PATCH v5 2/7] migration: migrate 'inc' command option is deprecated.
Date: Tue, 17 Oct 2023 17:21:42 +0200	[thread overview]
Message-ID: <87lec1z33t.fsf@secure.mitica> (raw)
In-Reply-To: <87zg0h5pbh.fsf@pond.sub.org> (Markus Armbruster's message of "Tue, 17 Oct 2023 15:52:18 +0200")

Markus Armbruster <armbru@redhat.com> wrote:
> Juan Quintela <quintela@redhat.com> writes:
>
>> Use blockdev-mirror with NBD 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      | 8 ++++++++
>>  qapi/migration.json            | 8 +++++++-
>>  migration/migration-hmp-cmds.c | 5 +++++
>>  migration/migration.c          | 5 +++++
>>  4 files changed, 25 insertions(+), 1 deletion(-)
>>
>> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
>> index 2febd2d12f..fc6adf1dea 100644
>> --- a/docs/about/deprecated.rst
>> +++ b/docs/about/deprecated.rst
>> @@ -461,3 +461,11 @@ 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)
>> +''''''''''''''''''''''''''''''''''''''''''
>> +
>> +Use blockdev-mirror with NBD instead.
>> +
>> +As an intermediate step the ``inc`` functionality can be achieved by
>> +setting the ``block-incremental`` migration parameter to ``true``.
>> +But this parameter is also deprecated.
>> diff --git a/qapi/migration.json b/qapi/migration.json
>> index db3df12d6c..fa7f4f2575 100644
>> --- a/qapi/migration.json
>> +++ b/qapi/migration.json
>> @@ -1524,6 +1524,11 @@
>>  #
>>  # @resume: resume one paused migration, default "off". (since 3.0)
>>  #
>> +# Features:
>> +#
>> +# @deprecated: Member @inc is deprecated.  Use blockdev-mirror with
>> +#     NBD instead.
>> +#
>>  # Returns: nothing on success
>>  #
>>  # Since: 0.14
>> @@ -1545,7 +1550,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-hmp-cmds.c b/migration/migration-hmp-cmds.c
>> index a82597f18e..fee7079afa 100644
>> --- a/migration/migration-hmp-cmds.c
>> +++ b/migration/migration-hmp-cmds.c
>> @@ -745,6 +745,11 @@ void hmp_migrate(Monitor *mon, const QDict *qdict)
>>      const char *uri = qdict_get_str(qdict, "uri");
>>      Error *err = NULL;
>>  
>> +    if (inc) {
>> +        warn_report("option '-i' is deprecated.  Use 'blockdev-mirror + NBD'"
>> +                    " instead.");
>
> Convention: an error or warning message is a single phrase, with no
> newline or trailing punctuation.  The simplest way to conform to it is
> something like
>
>            warn_report("option '-i' is deprecated;"
>                        " use blockdev-mirror with NBD instead.");

then the trailing dot is not needed, right?

>> +    }
>> +
>>      qmp_migrate(uri, !!blk, blk, !!inc, inc,
>>                  false, false, true, resume, &err);
>>      if (hmp_handle_error(mon, err)) {
>> diff --git a/migration/migration.c b/migration/migration.c
>> index 6ba5e145ac..b8b3ba58df 100644
>> --- a/migration/migration.c
>> +++ b/migration/migration.c
>> @@ -1603,6 +1603,11 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc,
>>  {
>>      Error *local_err = NULL;
>>  
>> +    if (blk_inc) {
>> +        warn_report("parameter 'inc' is deprecated.  Use blockdev-mirror with"
>> +                    " NBD instead");
>
> Likewise.
>
>> +    }
>> +
>>      if (resume) {
>>          if (s->state != MIGRATION_STATUS_POSTCOPY_PAUSED) {
>>              error_setg(errp, "Cannot resume if there is no "
>
> Other than that
> Reviewed-by: Markus Armbruster <armbru@redhat.com>

OK, fixing it.



  reply	other threads:[~2023-10-17 15:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 11:52 [PATCH v5 0/7] Migration deprecated parts Juan Quintela
2023-10-17 11:52 ` [PATCH v5 1/7] migration: Print block status when needed Juan Quintela
2023-10-17 16:27   ` Fabiano Rosas
2023-10-17 11:52 ` [PATCH v5 2/7] migration: migrate 'inc' command option is deprecated Juan Quintela
2023-10-17 13:52   ` Markus Armbruster
2023-10-17 15:21     ` Juan Quintela [this message]
2023-10-18  6:54       ` Markus Armbruster
2023-10-17 11:52 ` [PATCH v5 3/7] migration: migrate 'blk' " Juan Quintela
2023-10-17 13:57   ` Markus Armbruster
2023-10-17 15:35     ` Juan Quintela
2023-10-17 11:52 ` [PATCH v5 4/7] migration: Deprecate block migration Juan Quintela
2023-10-17 13:59   ` Markus Armbruster
2023-10-17 15:41     ` Juan Quintela
2023-10-17 11:52 ` [PATCH v5 5/7] migration: Deprecate old compression method Juan Quintela
2023-10-17 14:03   ` Markus Armbruster
2023-10-17 17:15     ` Juan Quintela
2023-10-18  7:13       ` Markus Armbruster
2023-10-17 11:52 ` [PATCH v5 6/7] [RFC] migration: Make -i/-b an error for hmp and qmp Juan Quintela
2023-10-17 11:52 ` [PATCH v5 7/7] [RFC] migration: Remove helpers needed for -i/-b migrate options 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=87lec1z33t.fsf@secure.mitica \
    --to=quintela@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=fam@euphon.net \
    --cc=farosas@suse.de \
    --cc=leobras@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).