mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
migration: notifier error checking
Check the status returned by migration notifiers for event type MIG_EVENT_PRECOPY_SETUP, and report errors. None of the notifiers return an error status at this time. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/r/1708622920-68779-10-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
parent
bf78a046b9
commit
4af667f87c
2 changed files with 23 additions and 10 deletions
|
@ -72,6 +72,11 @@ typedef struct MigrationEvent {
|
|||
MigrationEventType type;
|
||||
} MigrationEvent;
|
||||
|
||||
/*
|
||||
* A MigrationNotifyFunc may return an error code and an Error object,
|
||||
* but only when @e->type is MIG_EVENT_PRECOPY_SETUP. The code is an int
|
||||
* to allow for different failure modes and recovery actions.
|
||||
*/
|
||||
typedef int (*MigrationNotifyFunc)(NotifierWithReturn *notify,
|
||||
MigrationEvent *e, Error **errp);
|
||||
|
||||
|
@ -93,7 +98,8 @@ void migration_add_notifier_mode(NotifierWithReturn *notify,
|
|||
MigrationNotifyFunc func, MigMode mode);
|
||||
|
||||
void migration_remove_notifier(NotifierWithReturn *notify);
|
||||
void migration_call_notifiers(MigrationState *s, MigrationEventType type);
|
||||
int migration_call_notifiers(MigrationState *s, MigrationEventType type,
|
||||
Error **errp);
|
||||
bool migration_in_setup(MigrationState *);
|
||||
bool migration_has_finished(MigrationState *);
|
||||
bool migration_has_failed(MigrationState *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue