mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 06:43:53 -06:00
migration: disallow migrate_add_blocker during migration
If a migration is already in progress and somebody attempts to add a migration blocker, this should rightly fail. Add an errp parameter and a retcode return value to migrate_add_blocker. Signed-off-by: John Snow <jsnow@redhat.com> Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com> Message-Id: <1484566314-3987-5-git-send-email-ashijeetacharya@gmail.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: Greg Kurz <groug@kaod.org> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Merged with recent 'Allow invtsc migration' change
This commit is contained in:
parent
a3a3d8c738
commit
fe44dc9180
18 changed files with 222 additions and 81 deletions
|
@ -243,6 +243,7 @@ void remove_migration_state_change_notifier(Notifier *notify);
|
|||
MigrationState *migrate_init(const MigrationParams *params);
|
||||
bool migration_is_blocked(Error **errp);
|
||||
bool migration_in_setup(MigrationState *);
|
||||
bool migration_is_idle(MigrationState *s);
|
||||
bool migration_has_finished(MigrationState *);
|
||||
bool migration_has_failed(MigrationState *);
|
||||
/* True if outgoing migration has entered postcopy phase */
|
||||
|
@ -287,8 +288,12 @@ int ram_postcopy_incoming_init(MigrationIncomingState *mis);
|
|||
* @migrate_add_blocker - prevent migration from proceeding
|
||||
*
|
||||
* @reason - an error to be returned whenever migration is attempted
|
||||
*
|
||||
* @errp - [out] The reason (if any) we cannot block migration right now.
|
||||
*
|
||||
* @returns - 0 on success, -EBUSY on failure, with errp set.
|
||||
*/
|
||||
void migrate_add_blocker(Error *reason);
|
||||
int migrate_add_blocker(Error *reason, Error **errp);
|
||||
|
||||
/**
|
||||
* @migrate_del_blocker - remove a blocking error from migration
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue