]> git.proxmox.com Git - mirror_qemu.git/commit - migration/migration.c
migration: move wait-unplug loop to its own function
authorLaurent Vivier <lvivier@redhat.com>
Tue, 29 Jun 2021 15:50:06 +0000 (17:50 +0200)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Mon, 5 Jul 2021 09:51:26 +0000 (10:51 +0100)
commitfde93d99d9c208c07e2dcc24cd04e824d2b65b35
treef046a0e42947a745383fd92f6178b24d0d957b4b
parentb7f9afd48e7bc5c341e55348f2c2eed08314be7d
migration: move wait-unplug loop to its own function

The loop is used in migration_thread() and bg_migration_thread(),
so we can move it to its own function and call it from these both places.

Moreover, in migration_thread() we have a wrong state transition from
SETUP to ACTIVE while state could be WAIT_UNPLUG. This is correctly
managed in bg_migration_thread() so use this code instead.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20210629155007.629086-2-lvivier@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/migration.c