]> git.proxmox.com Git - mirror_qemu.git/commit - migration/migration.c
migration: Add Error** argument to qemu_savevm_state_setup()
authorCédric Le Goater <clg@redhat.com>
Wed, 20 Mar 2024 06:49:02 +0000 (07:49 +0100)
committerPeter Xu <peterx@redhat.com>
Tue, 23 Apr 2024 22:36:01 +0000 (18:36 -0400)
commit057a20099b62c5ac3c925f3fe12bdedac96e647b
tree32d310788cdc8dbdb90b9c9437ce2c1e2ad8de65
parent6138d43ab2b1d013ebe2cfe2917e6279396473b2
migration: Add Error** argument to qemu_savevm_state_setup()

This prepares ground for the changes coming next which add an Error**
argument to the .save_setup() handler. Callers of qemu_savevm_state_setup()
now handle the error and fail earlier setting the migration state from
MIGRATION_STATUS_SETUP to MIGRATION_STATUS_FAILED.

In qemu_savevm_state(), move the cleanup to preserve the error
reported by .save_setup() handlers.

Since the previous behavior was to ignore errors at this step of
migration, this change should be examined closely to check that
cleanups are still correctly done.

Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20240320064911.545001-7-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
migration/migration.c
migration/savevm.c
migration/savevm.h