diff options
author | Steve Sistare <steven.sistare@oracle.com> | 2024-02-22 09:28:35 -0800 |
---|---|---|
committer | Peter Xu <peterx@redhat.com> | 2024-02-28 11:31:28 +0800 |
commit | 4af667f87c629b4439f93a0b116d7674aa0cb1ad (patch) | |
tree | 1ba10308075cf42af2731e39bf9ea2aae7bfc51b /include/migration/misc.h | |
parent | bf78a046b917a92fa50a4c1b6631a3c4598d0235 (diff) |
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>
Diffstat (limited to 'include/migration/misc.h')
-rw-r--r-- | include/migration/misc.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/migration/misc.h b/include/migration/misc.h index 4dc06a92b7..e4933b815b 100644 --- a/include/migration/misc.h +++ b/include/migration/misc.h @@ -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 *); |