[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 3/7] migration: migrate 'blk' command option is deprecated
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v5 3/7] migration: migrate 'blk' command option is deprecated. |
Date: |
Tue, 17 Oct 2023 15:57:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Juan Quintela <quintela@redhat.com> writes:
> Use blocked-mirror with NBD instead.
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
>
> ---
>
> Improve documentation and style (markus)
> ---
> docs/about/deprecated.rst | 10 ++++++++++
> qapi/migration.json | 6 ++++--
> migration/migration-hmp-cmds.c | 5 +++++
> migration/migration.c | 5 +++++
> 4 files changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index fc6adf1dea..0149f040b6 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -469,3 +469,13 @@ 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.
> +
> +``blk`` migrate command option (since 8.2)
> +''''''''''''''''''''''''''''''''''''''''''
> +
> +Use blockdev-mirror with NBD instead.
> +
> +As an intermediate step the ``blk`` functionality can be achieved by
> +setting the ``block`` migration capability to ``true``.
> +But this capability is also deprecated.
> +
> diff --git a/qapi/migration.json b/qapi/migration.json
> index fa7f4f2575..59a07b50f0 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -1527,7 +1527,8 @@
> # Features:
> #
> # @deprecated: Member @inc is deprecated. Use blockdev-mirror with
> -# NBD instead.
> +# NBD instead. Member @blk is deprecated. Use blockdev-mirror
> +# with NBD instead.
Better:
# @deprecated: Members @inc and @blk are deprecated. Use
# blockdev-mirror with NBD instead.
> #
> # Returns: nothing on success
> #
> @@ -1550,7 +1551,8 @@
> # <- { "return": {} }
> ##
> { 'command': 'migrate',
> - 'data': {'uri': 'str', '*blk': 'bool',
> + 'data': {'uri': 'str',
> + '*blk': { 'type': 'bool', 'features': [ 'deprecated' ] },
> '*inc': { 'type': 'bool', 'features': [ 'deprecated' ] },
> '*detach': 'bool', '*resume': 'bool' } }
>
> diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c
> index fee7079afa..bfeb1a476a 100644
> --- a/migration/migration-hmp-cmds.c
> +++ b/migration/migration-hmp-cmds.c
> @@ -750,6 +750,11 @@ void hmp_migrate(Monitor *mon, const QDict *qdict)
> " instead.");
> }
>
> + if (blk) {
> + warn_report("option '-b' is deprecated. Use 'blockdev-mirror + NBD'"
> + " instead.");
warn_report("option '-b' is deprecated;"
" use blockdev-mirror with NBD instead.");
> + }
> +
> 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 b8b3ba58df..4da7fcfe0f 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -1608,6 +1608,11 @@ static bool migrate_prepare(MigrationState *s, bool
> blk, bool blk_inc,
> " NBD instead");
> }
>
> + if (blk) {
> + warn_report("capability 'blk is deprecated. Use blockdev-mirror
> with"
> + " NBD instead");
> + }
Capability? Isn't this a parameter?
"'blk" lacks a closing single quote.
I figure we want
warn_report("parameter 'blk' is deprecated;"
" use blockdev-mirror with NBD instead.");
> +
> 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>
- [PATCH v5 5/7] migration: Deprecate old compression method, (continued)
- [PATCH v5 6/7] [RFC] migration: Make -i/-b an error for hmp and qmp, Juan Quintela, 2023/10/17
- [PATCH v5 4/7] migration: Deprecate block migration, Juan Quintela, 2023/10/17
- [PATCH v5 7/7] [RFC] migration: Remove helpers needed for -i/-b migrate options, Juan Quintela, 2023/10/17
- [PATCH v5 3/7] migration: migrate 'blk' command option is deprecated., Juan Quintela, 2023/10/17
- Re: [PATCH v5 3/7] migration: migrate 'blk' command option is deprecated.,
Markus Armbruster <=