
On Tue, May 10, 2022 at 17:21:17 +0200, Jiri Denemark wrote:
qemuMigrationSrcRun does a lot of thing before and after telling QEMU to start the migration. Let's make the core reusable by moving it to a new qemuMigrationSrcStart function.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_migration.c | 118 +++++++++++++++++++++++--------------- 1 file changed, 71 insertions(+), 47 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index dd18a4ad63..e1c67c51ec 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -4413,6 +4413,76 @@ qemuMigrationSrcRunPrepareBlockDirtyBitmaps(virDomainObj *vm, }
+/* The caller is supposed to enter monitor before calling this. */ +static int +qemuMigrationSrcStart(virQEMUDriver *driver,
driver should not be needed.
+ virDomainObj *vm, + qemuMigrationSpec *spec, + unsigned int migrateFlags, + int *tunnelFd) +{ + qemuDomainObjPrivate *priv = vm->privateData;
you can get it in priv->driver.
+ g_autofree char *timestamp = NULL; + int rc;
Reviewed-by: Peter Krempa <pkrempa@redhat.com>