summary refs log tree commit diff stats
path: root/migration/migration.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2025-02-04 22:13:55 +0100
committerKevin Wolf <kwolf@redhat.com>2025-02-06 14:26:51 +0100
commitc2a189976e211c9ff782538d5a5ed5e5cffeccd6 (patch)
tree62d673f143615cbbbd995cdd360a55d3d5424367 /migration/migration.c
parente80210ffb24c4e47650344ba77ce3ed354af596c (diff)
downloadfocaccia-qemu-c2a189976e211c9ff782538d5a5ed5e5cffeccd6.tar.gz
focaccia-qemu-c2a189976e211c9ff782538d5a5ed5e5cffeccd6.zip
migration/block-active: Remove global active flag
Block devices have an individual active state, a single global flag
can't cover this correctly. This becomes more important as we allow
users to manually manage which nodes are active or inactive.

Now that it's allowed to call bdrv_inactivate_all() even when some
nodes are already inactive, we can remove the flag and just
unconditionally call bdrv_inactivate_all() and, more importantly,
bdrv_activate_all() before we make use of the nodes.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20250204211407.381505-5-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'migration/migration.c')
-rw-r--r--migration/migration.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 74c50cc72c..95e05bbc3b 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1895,12 +1895,6 @@ void qmp_migrate_incoming(const char *uri, bool has_channels,
         return;
     }
 
-    /*
-     * Newly setup incoming QEMU.  Mark the block active state to reflect
-     * that the src currently owns the disks.
-     */
-    migration_block_active_setup(false);
-
     once = false;
 }
 
@@ -3992,8 +3986,6 @@ static void migration_instance_init(Object *obj)
     ms->state = MIGRATION_STATUS_NONE;
     ms->mbps = -1;
     ms->pages_per_second = -1;
-    /* Freshly started QEMU owns all the block devices */
-    migration_block_active_setup(true);
     qemu_sem_init(&ms->pause_sem, 0);
     qemu_mutex_init(&ms->error_mutex);