diff mbox series

[v3,2/4] migration: migrate 'blk' command option is deprecated.

Message ID 20231011204711.9744-3-quintela@redhat.com (mailing list archive)
State New, archived
Headers show
Series Migration deprecated parts | expand

Commit Message

Juan Quintela Oct. 11, 2023, 8:47 p.m. UTC
Set the 'block' migration capability to 'true' instead.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 docs/about/deprecated.rst |  7 +++++++
 qapi/migration.json       | 10 +++++++---
 migration/migration.c     |  5 +++++
 3 files changed, 19 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index eb0f326f00..b2b7e11742 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -424,3 +424,10 @@  The new way to modify migration is using migration parameters.
 ``inc`` functionality can be achieved by setting the
 ``block-incremental`` migration parameter to ``true``.
 
+``blk`` migrate command option (since 8.2)
+''''''''''''''''''''''''''''''''''''''''''
+
+The new way to modify migration is using migration parameters.
+``blk`` functionality can be achieved by setting the
+``block`` migration capability to ``true``.
+
diff --git a/qapi/migration.json b/qapi/migration.json
index 7669c98c7a..e4949e0d8e 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -1484,7 +1484,9 @@ 
 #
 # @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.  Set the 'block' migration capability to 'true'
+#     instead.
 #
 # @inc: incremental disk copy migration.  This option is deprecated.
 #     Set the 'block-incremetantal' migration parameter to 'true'
@@ -1498,7 +1500,8 @@ 
 # Features:
 #
 # @deprecated: option @inc should be enabled by setting the
-#     'block-incremental' migration parameter to 'true'.
+#     'block-incremental' migration parameter to 'true', option @blk
+#     should be enabled by setting the 'block' capability to 'true'.
 #
 # Returns: nothing on success
 #
@@ -1521,7 +1524,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 c7e4c37b8a..dbe33bfd37 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1607,6 +1607,11 @@  static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc,
                     " instead.");
     }
 
+    if (blk) {
+        warn_report("-blk migrate option is deprecated, set the "
+                    "'block' capability to 'true' instead.");
+    }
+
     if (resume) {
         if (s->state != MIGRATION_STATUS_POSTCOPY_PAUSED) {
             error_setg(errp, "Cannot resume if there is no "