* [PATCH v8 1/5] qemu-iotests: Filter warnings about block migration being deprecated
2023-10-18 11:55 [PATCH v8 0/5] Migration deprecated parts Juan Quintela
@ 2023-10-18 11:55 ` Juan Quintela
2023-10-24 11:11 ` Hanna Czenczek
2023-10-18 11:55 ` [PATCH v8 2/5] migration: migrate 'inc' command option is deprecated Juan Quintela
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Juan Quintela @ 2023-10-18 11:55 UTC (permalink / raw)
To: qemu-devel
Cc: Juan Quintela, Stefan Hajnoczi, Fabiano Rosas, Kevin Wolf,
Eric Blake, qemu-block, Leonardo Bras, Markus Armbruster,
Fam Zheng, Peter Xu, libvir-list, Hanna Reitz
Create a new filter that removes the two warnings for test 183.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
tests/qemu-iotests/183 | 2 +-
tests/qemu-iotests/common.filter | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/183 b/tests/qemu-iotests/183
index ee62939e72..b85770458e 100755
--- a/tests/qemu-iotests/183
+++ b/tests/qemu-iotests/183
@@ -90,7 +90,7 @@ echo
reply="$(_send_qemu_cmd $src \
"{ 'execute': 'migrate',
'arguments': { 'uri': 'unix:${MIG_SOCKET}', 'blk': true } }" \
- 'return\|error')"
+ 'return\|error' | _filter_migration_block_deprecated)"
echo "$reply"
if echo "$reply" | grep "compiled without old-style" > /dev/null; then
_notrun "migrate -b support not compiled in"
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index fc3c64bcb8..2846c83808 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -359,5 +359,12 @@ _filter_qcow2_compression_type_bit()
-e 's/\(incompatible_features.*\), 3\(,.*\)/\1\2/'
}
+# filter warnings caused for block migration deprecation
+_filter_migration_block_deprecated()
+{
+ gsed -e '/warning: parameter .blk. is deprecated; use blockdev-mirror with NBD instead/d' \
+ -e '/warning: block migration is deprecated; use blockdev-mirror with NBD instead/d'
+}
+
# make sure this script returns success
true
--
2.41.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v8 1/5] qemu-iotests: Filter warnings about block migration being deprecated
2023-10-18 11:55 ` [PATCH v8 1/5] qemu-iotests: Filter warnings about block migration being deprecated Juan Quintela
@ 2023-10-24 11:11 ` Hanna Czenczek
2023-10-24 11:23 ` Juan Quintela
0 siblings, 1 reply; 8+ messages in thread
From: Hanna Czenczek @ 2023-10-24 11:11 UTC (permalink / raw)
To: Juan Quintela, qemu-devel
Cc: Stefan Hajnoczi, Fabiano Rosas, Kevin Wolf, Eric Blake,
qemu-block, Leonardo Bras, Markus Armbruster, Fam Zheng, Peter Xu,
libvir-list
On 18.10.23 13:55, Juan Quintela wrote:
> Create a new filter that removes the two warnings for test 183.
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
> tests/qemu-iotests/183 | 2 +-
> tests/qemu-iotests/common.filter | 7 +++++++
> 2 files changed, 8 insertions(+), 1 deletion(-)
Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v8 1/5] qemu-iotests: Filter warnings about block migration being deprecated
2023-10-24 11:11 ` Hanna Czenczek
@ 2023-10-24 11:23 ` Juan Quintela
0 siblings, 0 replies; 8+ messages in thread
From: Juan Quintela @ 2023-10-24 11:23 UTC (permalink / raw)
To: Hanna Czenczek
Cc: qemu-devel, Stefan Hajnoczi, Fabiano Rosas, Kevin Wolf,
Eric Blake, qemu-block, Leonardo Bras, Markus Armbruster,
Fam Zheng, Peter Xu, libvir-list
Hanna Czenczek <hreitz@redhat.com> wrote:
> On 18.10.23 13:55, Juan Quintela wrote:
>> Create a new filter that removes the two warnings for test 183.
>>
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>> tests/qemu-iotests/183 | 2 +-
>> tests/qemu-iotests/common.filter | 7 +++++++
>> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v8 2/5] migration: migrate 'inc' command option is deprecated.
2023-10-18 11:55 [PATCH v8 0/5] Migration deprecated parts Juan Quintela
2023-10-18 11:55 ` [PATCH v8 1/5] qemu-iotests: Filter warnings about block migration being deprecated Juan Quintela
@ 2023-10-18 11:55 ` Juan Quintela
2023-10-18 11:55 ` [PATCH v8 3/5] migration: migrate 'blk' " Juan Quintela
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Juan Quintela @ 2023-10-18 11:55 UTC (permalink / raw)
To: qemu-devel
Cc: Juan Quintela, Stefan Hajnoczi, Fabiano Rosas, Kevin Wolf,
Eric Blake, qemu-block, Leonardo Bras, Markus Armbruster,
Fam Zheng, Peter Xu, libvir-list, Hanna Reitz, Thomas Huth
Use blockdev-mirror with NBD instead.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
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..83176f5bae 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 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 05c0b801ba..27145cd99e 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1604,6 +1604,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");
+ }
+
if (resume) {
if (s->state != MIGRATION_STATUS_POSTCOPY_PAUSED) {
error_setg(errp, "Cannot resume if there is no "
--
2.41.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v8 3/5] migration: migrate 'blk' command option is deprecated.
2023-10-18 11:55 [PATCH v8 0/5] Migration deprecated parts Juan Quintela
2023-10-18 11:55 ` [PATCH v8 1/5] qemu-iotests: Filter warnings about block migration being deprecated Juan Quintela
2023-10-18 11:55 ` [PATCH v8 2/5] migration: migrate 'inc' command option is deprecated Juan Quintela
@ 2023-10-18 11:55 ` Juan Quintela
2023-10-18 11:55 ` [PATCH v8 4/5] migration: Deprecate block migration Juan Quintela
2023-10-18 11:55 ` [PATCH v8 5/5] migration: Deprecate old compression method Juan Quintela
4 siblings, 0 replies; 8+ messages in thread
From: Juan Quintela @ 2023-10-18 11:55 UTC (permalink / raw)
To: qemu-devel
Cc: Juan Quintela, Stefan Hajnoczi, Fabiano Rosas, Kevin Wolf,
Eric Blake, qemu-block, Leonardo Bras, Markus Armbruster,
Fam Zheng, Peter Xu, libvir-list, Hanna Reitz, Thomas Huth
Use blocked-mirror with NBD instead.
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
docs/about/deprecated.rst | 9 +++++++++
qapi/migration.json | 7 ++++---
migration/migration-hmp-cmds.c | 5 +++++
migration/migration.c | 5 +++++
4 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index fc6adf1dea..98b0f14e69 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -469,3 +469,12 @@ 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..3765c2b662 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -1526,8 +1526,8 @@
#
# Features:
#
-# @deprecated: Member @inc is deprecated. Use blockdev-mirror with
-# NBD instead.
+# @deprecated: Members @inc and @blk are deprecated. Use
+# blockdev-mirror with NBD instead.
#
# Returns: nothing on success
#
@@ -1550,7 +1550,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 83176f5bae..dfe98da355 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)
" use blockdev-mirror with NBD instead");
}
+ if (blk) {
+ 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 27145cd99e..79b742b98b 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1609,6 +1609,11 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc,
" use blockdev-mirror with NBD instead");
}
+ if (blk) {
+ 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 "
--
2.41.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v8 4/5] migration: Deprecate block migration
2023-10-18 11:55 [PATCH v8 0/5] Migration deprecated parts Juan Quintela
` (2 preceding siblings ...)
2023-10-18 11:55 ` [PATCH v8 3/5] migration: migrate 'blk' " Juan Quintela
@ 2023-10-18 11:55 ` Juan Quintela
2023-10-18 11:55 ` [PATCH v8 5/5] migration: Deprecate old compression method Juan Quintela
4 siblings, 0 replies; 8+ messages in thread
From: Juan Quintela @ 2023-10-18 11:55 UTC (permalink / raw)
To: qemu-devel
Cc: Juan Quintela, Stefan Hajnoczi, Fabiano Rosas, Kevin Wolf,
Eric Blake, qemu-block, Leonardo Bras, Markus Armbruster,
Fam Zheng, Peter Xu, libvir-list, Hanna Reitz
It is obsolete. It is better to use driver-mirror with NBD instead.
CC: Kevin Wolf <kwolf@redhat.com>
CC: Eric Blake <eblake@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Hanna Czenczek <hreitz@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
docs/about/deprecated.rst | 10 ++++++++++
qapi/migration.json | 29 ++++++++++++++++++++++++-----
migration/block.c | 3 +++
migration/options.c | 9 ++++++++-
4 files changed, 45 insertions(+), 6 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 98b0f14e69..7ae872162d 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -478,3 +478,13 @@ 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.
+
+block migration (since 8.2)
+'''''''''''''''''''''''''''
+
+Block migration is too inflexible. It needs to migrate all block
+devices or none.
+
+Please see "QMP invocation for live storage migration with
+``blockdev-mirror`` + NBD" in docs/interop/live-block-operations.rst
+for a detailed explanation.
diff --git a/qapi/migration.json b/qapi/migration.json
index 3765c2b662..e3b00a215b 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -269,11 +269,15 @@
# average memory load of the virtual CPU indirectly. Note that
# zero means guest doesn't dirty memory. (Since 8.1)
#
+# Features:
+#
+# @deprecated: Member @disk is deprecated because block migration is.
+#
# Since: 0.14
##
{ 'struct': 'MigrationInfo',
'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
- '*disk': 'MigrationStats',
+ '*disk': { 'type': 'MigrationStats', 'features': [ 'deprecated' ] },
'*vfio': 'VfioStats',
'*xbzrle-cache': 'XBZRLECacheStats',
'*total-time': 'int',
@@ -525,6 +529,9 @@
#
# Features:
#
+# @deprecated: Member @block is deprecated. Use blockdev-mirror with
+# NBD instead.
+#
# @unstable: Members @x-colo and @x-ignore-shared are experimental.
#
# Since: 1.2
@@ -534,7 +541,8 @@
'compress', 'events', 'postcopy-ram',
{ 'name': 'x-colo', 'features': [ 'unstable' ] },
'release-ram',
- 'block', 'return-path', 'pause-before-switchover', 'multifd',
+ { 'name': 'block', 'features': [ 'deprecated' ] },
+ 'return-path', 'pause-before-switchover', 'multifd',
'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate',
{ 'name': 'x-ignore-shared', 'features': [ 'unstable' ] },
'validate-uuid', 'background-snapshot',
@@ -835,6 +843,9 @@
#
# Features:
#
+# @deprecated: Member @block-incremental is deprecated. Use
+# blockdev-mirror with NBD instead.
+#
# @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
# are experimental.
#
@@ -850,7 +861,7 @@
'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth',
'avail-switchover-bandwidth', 'downtime-limit',
{ 'name': 'x-checkpoint-delay', 'features': [ 'unstable' ] },
- 'block-incremental',
+ { 'name': 'block-incremental', 'features': [ 'deprecated' ] },
'multifd-channels',
'xbzrle-cache-size', 'max-postcopy-bandwidth',
'max-cpu-throttle', 'multifd-compression',
@@ -1011,6 +1022,9 @@
#
# Features:
#
+# @deprecated: Member @block-incremental is deprecated. Use
+# blockdev-mirror with NBD instead.
+#
# @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
# are experimental.
#
@@ -1040,7 +1054,8 @@
'*downtime-limit': 'uint64',
'*x-checkpoint-delay': { 'type': 'uint32',
'features': [ 'unstable' ] },
- '*block-incremental': 'bool',
+ '*block-incremental': { 'type': 'bool',
+ 'features': [ 'deprecated' ] },
'*multifd-channels': 'uint8',
'*xbzrle-cache-size': 'size',
'*max-postcopy-bandwidth': 'size',
@@ -1225,6 +1240,9 @@
#
# Features:
#
+# @deprecated: Member @block-incremental is deprecated. Use
+# blockdev-mirror with NBD instead.
+#
# @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
# are experimental.
#
@@ -1251,7 +1269,8 @@
'*downtime-limit': 'uint64',
'*x-checkpoint-delay': { 'type': 'uint32',
'features': [ 'unstable' ] },
- '*block-incremental': 'bool',
+ '*block-incremental': { 'type': 'bool',
+ 'features': [ 'deprecated' ] },
'*multifd-channels': 'uint8',
'*xbzrle-cache-size': 'size',
'*max-postcopy-bandwidth': 'size',
diff --git a/migration/block.c b/migration/block.c
index b60698d6e2..acffe88f84 100644
--- a/migration/block.c
+++ b/migration/block.c
@@ -731,6 +731,9 @@ static int block_save_setup(QEMUFile *f, void *opaque)
trace_migration_block_save("setup", block_mig_state.submitted,
block_mig_state.transferred);
+ warn_report("block migration is deprecated;"
+ " use blockdev-mirror with NBD instead");
+
ret = init_blk_migration(f);
if (ret < 0) {
return ret;
diff --git a/migration/options.c b/migration/options.c
index 42fb818956..a753eae438 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "exec/target_page.h"
#include "qapi/clone-visitor.h"
#include "qapi/error.h"
@@ -473,10 +474,14 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp)
if (new_caps[MIGRATION_CAPABILITY_BLOCK]) {
error_setg(errp, "QEMU compiled without old-style (blk/-b, inc/-i) "
"block migration");
- error_append_hint(errp, "Use drive_mirror+NBD instead.\n");
+ error_append_hint(errp, "Use blockdev-mirror with NBD instead.\n");
return false;
}
#endif
+ if (new_caps[MIGRATION_CAPABILITY_BLOCK]) {
+ warn_report("block migration is deprecated;"
+ " use blockdev-mirror with NBD instead");
+ }
#ifndef CONFIG_REPLICATION
if (new_caps[MIGRATION_CAPABILITY_X_COLO]) {
@@ -1386,6 +1391,8 @@ static void migrate_params_apply(MigrateSetParameters *params, Error **errp)
}
if (params->has_block_incremental) {
+ warn_report("block migration is deprecated;"
+ " use blockdev-mirror with NBD instead");
s->parameters.block_incremental = params->block_incremental;
}
if (params->has_multifd_channels) {
--
2.41.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v8 5/5] migration: Deprecate old compression method
2023-10-18 11:55 [PATCH v8 0/5] Migration deprecated parts Juan Quintela
` (3 preceding siblings ...)
2023-10-18 11:55 ` [PATCH v8 4/5] migration: Deprecate block migration Juan Quintela
@ 2023-10-18 11:55 ` Juan Quintela
4 siblings, 0 replies; 8+ messages in thread
From: Juan Quintela @ 2023-10-18 11:55 UTC (permalink / raw)
To: qemu-devel
Cc: Juan Quintela, Stefan Hajnoczi, Fabiano Rosas, Kevin Wolf,
Eric Blake, qemu-block, Leonardo Bras, Markus Armbruster,
Fam Zheng, Peter Xu, libvir-list, Hanna Reitz
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
docs/about/deprecated.rst | 8 +++++
qapi/migration.json | 63 ++++++++++++++++++++++++++-------------
migration/options.c | 13 ++++++++
3 files changed, 64 insertions(+), 20 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 7ae872162d..e7f17827d3 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -488,3 +488,11 @@ devices or none.
Please see "QMP invocation for live storage migration with
``blockdev-mirror`` + NBD" in docs/interop/live-block-operations.rst
for a detailed explanation.
+
+old compression method (since 8.2)
+''''''''''''''''''''''''''''''''''
+
+Compression method fails too much. Too many races. We are going to
+remove it if nobody fixes it. For starters, migration-test
+compression tests are disabled becase they fail randomly. If you need
+compression, use multifd compression methods.
diff --git a/qapi/migration.json b/qapi/migration.json
index e3b00a215b..e6610af428 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -272,6 +272,10 @@
# Features:
#
# @deprecated: Member @disk is deprecated because block migration is.
+# Member @compression is deprecated because it is unreliable and
+# untested. It is recommended to use multifd migration, which
+# offers an alternative compression implementation that is
+# reliable and tested.
#
# Since: 0.14
##
@@ -289,7 +293,7 @@
'*blocked-reasons': ['str'],
'*postcopy-blocktime': 'uint32',
'*postcopy-vcpu-blocktime': ['uint32'],
- '*compression': 'CompressionStats',
+ '*compression': { 'type': 'CompressionStats', 'features': [ 'deprecated' ] },
'*socket-address': ['SocketAddress'],
'*dirty-limit-throttle-time-per-round': 'uint64',
'*dirty-limit-ring-full-time': 'uint64'} }
@@ -530,7 +534,10 @@
# Features:
#
# @deprecated: Member @block is deprecated. Use blockdev-mirror with
-# NBD instead.
+# NBD instead. Member @compression is deprecated because it is
+# unreliable and untested. It is recommended to use multifd
+# migration, which offers an alternative compression
+# implementation that is reliable and tested.
#
# @unstable: Members @x-colo and @x-ignore-shared are experimental.
#
@@ -538,7 +545,8 @@
##
{ 'enum': 'MigrationCapability',
'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
- 'compress', 'events', 'postcopy-ram',
+ { 'name': 'compress', 'features': [ 'deprecated' ] },
+ 'events', 'postcopy-ram',
{ 'name': 'x-colo', 'features': [ 'unstable' ] },
'release-ram',
{ 'name': 'block', 'features': [ 'deprecated' ] },
@@ -844,7 +852,9 @@
# Features:
#
# @deprecated: Member @block-incremental is deprecated. Use
-# blockdev-mirror with NBD instead.
+# blockdev-mirror with NBD instead. Members @compress-level,
+# @compress-threads, @decompress-threads and @compress-wait-thread
+# are deprecated because @compression is deprecated.
#
# @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
# are experimental.
@@ -854,8 +864,11 @@
{ 'enum': 'MigrationParameter',
'data': ['announce-initial', 'announce-max',
'announce-rounds', 'announce-step',
- 'compress-level', 'compress-threads', 'decompress-threads',
- 'compress-wait-thread', 'throttle-trigger-threshold',
+ { 'name': 'compress-level', 'features': [ 'deprecated' ] },
+ { 'name': 'compress-threads', 'features': [ 'deprecated' ] },
+ { 'name': 'decompress-threads', 'features': [ 'deprecated' ] },
+ { 'name': 'compress-wait-thread', 'features': [ 'deprecated' ] },
+ 'throttle-trigger-threshold',
'cpu-throttle-initial', 'cpu-throttle-increment',
'cpu-throttle-tailslow',
'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth',
@@ -1023,7 +1036,9 @@
# Features:
#
# @deprecated: Member @block-incremental is deprecated. Use
-# blockdev-mirror with NBD instead.
+# blockdev-mirror with NBD instead. Members @compress-level,
+# @compress-threads, @decompress-threads and @compress-wait-thread
+# are deprecated because @compression is deprecated.
#
# @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
# are experimental.
@@ -1038,10 +1053,14 @@
'*announce-max': 'size',
'*announce-rounds': 'size',
'*announce-step': 'size',
- '*compress-level': 'uint8',
- '*compress-threads': 'uint8',
- '*compress-wait-thread': 'bool',
- '*decompress-threads': 'uint8',
+ '*compress-level': { 'type': 'uint8',
+ 'features': [ 'deprecated' ] },
+ '*compress-threads': { 'type': 'uint8',
+ 'features': [ 'deprecated' ] },
+ '*compress-wait-thread': { 'type': 'bool',
+ 'features': [ 'deprecated' ] },
+ '*decompress-threads': { 'type': 'uint8',
+ 'features': [ 'deprecated' ] },
'*throttle-trigger-threshold': 'uint8',
'*cpu-throttle-initial': 'uint8',
'*cpu-throttle-increment': 'uint8',
@@ -1078,7 +1097,7 @@
# Example:
#
# -> { "execute": "migrate-set-parameters" ,
-# "arguments": { "compress-level": 1 } }
+# "arguments": { "multifd-channels": 5 } }
# <- { "return": {} }
##
{ 'command': 'migrate-set-parameters', 'boxed': true,
@@ -1241,7 +1260,9 @@
# Features:
#
# @deprecated: Member @block-incremental is deprecated. Use
-# blockdev-mirror with NBD instead.
+# blockdev-mirror with NBD instead. Members @compress-level,
+# @compress-threads, @decompress-threads and @compress-wait-thread
+# are deprecated because @compression is deprecated.
#
# @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
# are experimental.
@@ -1253,10 +1274,14 @@
'*announce-max': 'size',
'*announce-rounds': 'size',
'*announce-step': 'size',
- '*compress-level': 'uint8',
- '*compress-threads': 'uint8',
- '*compress-wait-thread': 'bool',
- '*decompress-threads': 'uint8',
+ '*compress-level': { 'type': 'uint8',
+ 'features': [ 'deprecated' ] },
+ '*compress-threads': { 'type': 'uint8',
+ 'features': [ 'deprecated' ] },
+ '*compress-wait-thread': { 'type': 'bool',
+ 'features': [ 'deprecated' ] },
+ '*decompress-threads': { 'type': 'uint8',
+ 'features': [ 'deprecated' ] },
'*throttle-trigger-threshold': 'uint8',
'*cpu-throttle-initial': 'uint8',
'*cpu-throttle-increment': 'uint8',
@@ -1296,10 +1321,8 @@
#
# -> { "execute": "query-migrate-parameters" }
# <- { "return": {
-# "decompress-threads": 2,
+# "multifd-channels": 2,
# "cpu-throttle-increment": 10,
-# "compress-threads": 8,
-# "compress-level": 1,
# "cpu-throttle-initial": 20,
# "max-bandwidth": 33554432,
# "downtime-limit": 300
diff --git a/migration/options.c b/migration/options.c
index a753eae438..b3514af9c3 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -483,6 +483,11 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp)
" use blockdev-mirror with NBD instead");
}
+ if (new_caps[MIGRATION_CAPABILITY_COMPRESS]) {
+ warn_report("old compression method is deprecated;"
+ " use multifd compression methods instead");
+ }
+
#ifndef CONFIG_REPLICATION
if (new_caps[MIGRATION_CAPABILITY_X_COLO]) {
error_setg(errp, "QEMU compiled without replication module"
@@ -1321,18 +1326,26 @@ static void migrate_params_apply(MigrateSetParameters *params, Error **errp)
/* TODO use QAPI_CLONE() instead of duplicating it inline */
if (params->has_compress_level) {
+ warn_report("old compression is deprecated;"
+ " use multifd compression methods instead");
s->parameters.compress_level = params->compress_level;
}
if (params->has_compress_threads) {
+ warn_report("old compression is deprecated;"
+ " use multifd compression methods instead");
s->parameters.compress_threads = params->compress_threads;
}
if (params->has_compress_wait_thread) {
+ warn_report("old compression is deprecated;"
+ " use multifd compression methods instead");
s->parameters.compress_wait_thread = params->compress_wait_thread;
}
if (params->has_decompress_threads) {
+ warn_report("old compression is deprecated;"
+ " use multifd compression methods instead");
s->parameters.decompress_threads = params->decompress_threads;
}
--
2.41.0
^ permalink raw reply related [flat|nested] 8+ messages in thread