mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
migration: Convert the file backend to the new QAPI syntax
Convert the file: URI to accept a FileMigrationArgs to be compatible with the new migration QAPI. Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231023182053.8711-9-farosas@suse.de>
This commit is contained in:
parent
cbab4face5
commit
02afba63e9
3 changed files with 17 additions and 24 deletions
|
@ -508,7 +508,6 @@ static bool migrate_uri_parse(const char *uri,
|
|||
|
||||
static void qemu_start_incoming_migration(const char *uri, Error **errp)
|
||||
{
|
||||
const char *p = NULL;
|
||||
g_autoptr(MigrationAddress) channel = NULL;
|
||||
MigrationIncomingState *mis = migration_incoming_get_current();
|
||||
|
||||
|
@ -551,8 +550,8 @@ static void qemu_start_incoming_migration(const char *uri, Error **errp)
|
|||
#endif
|
||||
} else if (channel->transport == MIGRATION_ADDRESS_TYPE_EXEC) {
|
||||
exec_start_incoming_migration(channel->u.exec.args, errp);
|
||||
} else if (strstart(uri, "file:", &p)) {
|
||||
file_start_incoming_migration(p, errp);
|
||||
} else if (channel->transport == MIGRATION_ADDRESS_TYPE_FILE) {
|
||||
file_start_incoming_migration(&channel->u.file, errp);
|
||||
} else {
|
||||
error_setg(errp, "unknown migration protocol: %s", uri);
|
||||
}
|
||||
|
@ -1900,7 +1899,6 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
|
|||
bool resume_requested;
|
||||
Error *local_err = NULL;
|
||||
MigrationState *s = migrate_get_current();
|
||||
const char *p = NULL;
|
||||
g_autoptr(MigrationAddress) channel = NULL;
|
||||
|
||||
/* URI is not suitable for migration? */
|
||||
|
@ -1940,8 +1938,8 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
|
|||
#endif
|
||||
} else if (channel->transport == MIGRATION_ADDRESS_TYPE_EXEC) {
|
||||
exec_start_outgoing_migration(s, channel->u.exec.args, &local_err);
|
||||
} else if (strstart(uri, "file:", &p)) {
|
||||
file_start_outgoing_migration(s, p, &local_err);
|
||||
} else if (channel->transport == MIGRATION_ADDRESS_TYPE_FILE) {
|
||||
file_start_outgoing_migration(s, &channel->u.file, &local_err);
|
||||
} else {
|
||||
error_setg(&local_err, QERR_INVALID_PARAMETER_VALUE, "uri",
|
||||
"a valid migration protocol");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue