Re: [PATCH 4/6] migration: Remove block migration

2024-04-26 Thread Markus Armbruster
Fabiano Rosas  writes:

> The block migration has been considered obsolete since QEMU 8.2 in
> favor of the more flexible storage migration provided by the
> blockdev-mirror driver. Two releases have passed so now it's time to
> remove it.
>
> Deprecation commit 66db46ca83 ("migration: Deprecate block
> migration").
>
> Signed-off-by: Fabiano Rosas 

[...]

> diff --git a/migration/migration.c b/migration/migration.c
> index a3dc8a7974..0f4df893e5 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c

[...]

> @@ -1997,8 +1983,6 @@ static bool migrate_prepare(MigrationState *s, bool 
> resume, Error **errp)
>  }
>  }
>  
> -s->must_remove_block_options = true;
> -
>  if (migrate_init(s, errp)) {
>  return false;
>  }
> @@ -2080,7 +2064,6 @@ void qmp_migrate(const char *uri, bool has_channels,
> "a valid migration protocol");
>  migrate_set_state(&s->state, MIGRATION_STATUS_SETUP,
>MIGRATION_STATUS_FAILED);
> -block_cleanup_parameters();
>  }
>  
>  if (local_err) {
> diff --git a/migration/options.c b/migration/options.c
> index 638eeeb9a0..5049bfb78e 100644
> --- a/migration/options.c
> +++ b/migration/options.c

[...]

> @@ -942,17 +917,6 @@ ZeroPageDetection migrate_zero_page_detection(void)
>  
>  /* parameters helpers */
>  
> -void block_cleanup_parameters(void)
> -{
> -MigrationState *s = migrate_get_current();
> -
> -if (s->must_remove_block_options) {
> -/* setting to false can never fail */
> -migrate_cap_set(MIGRATION_CAPABILITY_BLOCK, false, &error_abort);
> -s->must_remove_block_options = false;
> -}
> -}
> -

MigrationState member @must_remove_block_options is now unused.  Please
delete it.

>  AnnounceParameters *migrate_announce_params(void)
>  {
>  static AnnounceParameters ap;

[...]

With that:
Reviewed-by: Markus Armbruster 
___
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-le...@lists.libvirt.org


[PATCH 4/6] migration: Remove block migration

2024-04-25 Thread Fabiano Rosas
The block migration has been considered obsolete since QEMU 8.2 in
favor of the more flexible storage migration provided by the
blockdev-mirror driver. Two releases have passed so now it's time to
remove it.

Deprecation commit 66db46ca83 ("migration: Deprecate block
migration").

Signed-off-by: Fabiano Rosas 
---
 MAINTAINERS |1 -
 docs/about/deprecated.rst   |   10 -
 docs/about/removed-features.rst |   14 +
 docs/devel/migration/main.rst   |2 +-
 include/migration/misc.h|6 -
 meson.build |2 -
 meson_options.txt   |2 -
 migration/block.c   | 1018 ---
 migration/block.h   |   52 --
 migration/colo.c|1 -
 migration/meson.build   |3 -
 migration/migration-hmp-cmds.c  |   25 -
 migration/migration.c   |   17 -
 migration/options.c |   36 --
 migration/ram.c |   15 -
 migration/savevm.c  |5 -
 qapi/migration.json |   61 +-
 scripts/meson-buildoptions.sh   |4 -
 18 files changed, 26 insertions(+), 1248 deletions(-)
 delete mode 100644 migration/block.c
 delete mode 100644 migration/block.h

diff --git a/MAINTAINERS b/MAINTAINERS
index f1f6922025..9a53ac9ec2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2877,7 +2877,6 @@ F: util/aio-*.h
 F: util/defer-call.c
 F: util/fdmon-*.c
 F: block/io.c
-F: migration/block*
 F: include/block/aio.h
 F: include/block/aio-wait.h
 F: include/qemu/defer-call.h
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 83adb763e6..409c9e0c4d 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -488,16 +488,6 @@ option).
 Migration
 -
 
-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.
-
 old compression method (since 8.2)
 ''
 
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst
index 0ba94c826a..dd20f37f2c 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -634,6 +634,13 @@ Use blockdev-mirror with NBD instead. See "QMP invocation 
for live
 storage migration with ``blockdev-mirror`` + NBD" in
 docs/interop/live-block-operations.rst for a detailed explanation.
 
+``migrate-set-capabilities`` ``block`` option (removed in 9.1)
+''
+
+Block migration has been removed. For a replacement, see "QMP
+invocation for live storage migration with ``blockdev-mirror`` + NBD"
+in docs/interop/live-block-operations.rst.
+
 Human Monitor Protocol (HMP) commands
 -
 
@@ -708,6 +715,13 @@ Use blockdev-mirror with NBD instead. See "QMP invocation 
for live
 storage migration with ``blockdev-mirror`` + NBD" in
 docs/interop/live-block-operations.rst for a detailed explanation.
 
+``migrate_set_capability`` ``block`` option (removed in 9.1)
+
+
+Block migration has been removed. For a replacement, see "QMP
+invocation for live storage migration with ``blockdev-mirror`` + NBD"
+in docs/interop/live-block-operations.rst.
+
 Host Architectures
 --
 
diff --git a/docs/devel/migration/main.rst b/docs/devel/migration/main.rst
index 54385a23e5..495cdcb112 100644
--- a/docs/devel/migration/main.rst
+++ b/docs/devel/migration/main.rst
@@ -454,7 +454,7 @@ Examples of such API functions are:
 Iterative device migration
 --
 
-Some devices, such as RAM, Block storage or certain platform devices,
+Some devices, such as RAM or certain platform devices,
 have large amounts of data that would mean that the CPUs would be
 paused for too long if they were sent in one section.  For these
 devices an *iterative* approach is taken.
diff --git a/include/migration/misc.h b/include/migration/misc.h
index c9e200f4eb..bf7339cc1e 100644
--- a/include/migration/misc.h
+++ b/include/migration/misc.h
@@ -45,12 +45,6 @@ bool migrate_ram_is_ignored(RAMBlock *block);
 
 /* migration/block.c */
 
-#ifdef CONFIG_LIVE_BLOCK_MIGRATION
-void blk_mig_init(void);
-#else
-static inline void blk_mig_init(void) {}
-#endif
-
 AnnounceParameters *migrate_announce_params(void);
 /* migration/savevm.c */
 
diff --git a/meson.build b/meson.build
index 84e59dcbb4..2096050fd2 100644
--- a/meson.build
+++ b/meson.build
@@ -2350,7 +2350,6 @@ config_host_data.set('CONFIG_DEBUG_GRAPH_LOCK', 
get_option('debug_graph_lock'))
 config_host_data.set('CONFIG_DEBUG_MUTEX', get_option('debug_mutex'))
 config_host_data.set('CONFIG_DEBUG_STACK_USAGE', 
get_option('debug_stack_usage'))
 config_host_data.set('CONFIG_DEBUG_TCG', get_option('debug_tcg'))