diff mbox series

[RFC,3/6] migration: migrate 'blk' command option is deprecated.

Message ID 20230612193344.3796-4-quintela@redhat.com
State New
Headers show
Series Migration deprecated parts | expand

Commit Message

Juan Quintela June 12, 2023, 7:33 p.m. UTC
Use 'migrate_set_capability block true' instead.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 docs/about/deprecated.rst |  7 +++++++
 qapi/migration.json       | 11 +++++++----
 migration/migration.c     |  5 +++++
 3 files changed, 19 insertions(+), 4 deletions(-)

Comments

Daniel P. Berrangé June 20, 2023, 12:06 p.m. UTC | #1
On Mon, Jun 12, 2023 at 09:33:41PM +0200, Juan Quintela wrote:
> Use 'migrate_set_capability block true' instead.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  docs/about/deprecated.rst |  7 +++++++
>  qapi/migration.json       | 11 +++++++----
>  migration/migration.c     |  5 +++++
>  3 files changed, 19 insertions(+), 4 deletions(-)
> 
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index c75a3a8f5a..47e98dc95e 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -440,3 +440,10 @@ The new way to modify migration is using migration parameters.
>  ``inc`` functionality can be acchieved using
>  ``migrate_set_parameter block-incremental true``.
>  
> +``blk`` migrate command option (since 8.1)
> +''''''''''''''''''''''''''''''''''''''''''
> +
> +The new way to modify migration is using migration parameters.
> +``blk`` functionality can be acchieved using
> +``migrate_set_parameter block-incremental true``.

Same comments on rewording as the previous patch, so won't repeate them
all.


With regards,
Daniel
Juan Quintela June 22, 2023, 6:12 p.m. UTC | #2
Daniel P. Berrangé <berrange@redhat.com> wrote:
> On Mon, Jun 12, 2023 at 09:33:41PM +0200, Juan Quintela wrote:
>> Use 'migrate_set_capability block true' instead.
>> 
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>>  docs/about/deprecated.rst |  7 +++++++
>>  qapi/migration.json       | 11 +++++++----
>>  migration/migration.c     |  5 +++++
>>  3 files changed, 19 insertions(+), 4 deletions(-)
>> 
>> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
>> index c75a3a8f5a..47e98dc95e 100644
>> --- a/docs/about/deprecated.rst
>> +++ b/docs/about/deprecated.rst
>> @@ -440,3 +440,10 @@ The new way to modify migration is using migration parameters.
>>  ``inc`` functionality can be acchieved using
>>  ``migrate_set_parameter block-incremental true``.
>>  
>> +``blk`` migrate command option (since 8.1)
>> +''''''''''''''''''''''''''''''''''''''''''
>> +
>> +The new way to modify migration is using migration parameters.
>> +``blk`` functionality can be acchieved using
>> +``migrate_set_parameter block-incremental true``.
>
> Same comments on rewording as the previous patch, so won't repeate them
> all.

Did the same than the previous one.  Thanks.
diff mbox series

Patch

diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index c75a3a8f5a..47e98dc95e 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -440,3 +440,10 @@  The new way to modify migration is using migration parameters.
 ``inc`` functionality can be acchieved using
 ``migrate_set_parameter block-incremental true``.
 
+``blk`` migrate command option (since 8.1)
+''''''''''''''''''''''''''''''''''''''''''
+
+The new way to modify migration is using migration parameters.
+``blk`` functionality can be acchieved using
+``migrate_set_parameter block-incremental true``.
+
diff --git a/qapi/migration.json b/qapi/migration.json
index 4ee28df6da..b71e00737e 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -1422,7 +1422,8 @@ 
 #
 # @uri: the Uniform Resource Identifier of the destination VM
 #
-# @blk: do block migration (full disk copy)
+# @blk: do block migration (full disk copy). This option is deprecated.
+#    Use 'migrate_set_capability block true' instead.
 #
 # @inc: incremental disk copy migration.  This option is deprecated.
 #    Use 'migrate_set_parameter block-incremetantal true' instead.
@@ -1434,8 +1435,9 @@ 
 #
 # Features:
 #
-# @deprecated: option @inc is better set with
-#     'migrate_set_parameter block-incremental true'.
+# @deprecated: options @inc and @blk are better set with
+#     'migrate_set_parameter block-incremental true' and
+#     'migrate_set_capability block true' respectively.
 #
 # Returns: nothing on success
 #
@@ -1458,7 +1460,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.c b/migration/migration.c
index 7ebce7c7bf..b7d5f6b96c 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1549,6 +1549,11 @@  static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc,
                     "'migrate_set_parameter block-incremental true' instead.");
     }
 
+    if (blk) {
+        warn_report("-blk migrate option is deprecated, use"
+                    "'migrate_set_capability block true' instead.");
+    }
+
     if (resume) {
         if (s->state != MIGRATION_STATUS_POSTCOPY_PAUSED) {
             error_setg(errp, "Cannot resume if there is no "