mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
add migration state change notifiers
This patch adds functions to register and unregister notifiers for migration state changes and a function to query the migration state. The notifier is called on every state change. Once after establishing a new migration object (which is in active state then) and once when the state changes from active to completed, canceled or error. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
0bfe006c53
commit
99a0db9b8d
2 changed files with 33 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include "qdict.h"
|
||||
#include "qemu-common.h"
|
||||
#include "notify.h"
|
||||
|
||||
#define MIG_STATE_ERROR -1
|
||||
#define MIG_STATE_COMPLETED 0
|
||||
|
@ -134,4 +135,8 @@ static inline FdMigrationState *migrate_to_fms(MigrationState *mig_state)
|
|||
return container_of(mig_state, FdMigrationState, mig_state);
|
||||
}
|
||||
|
||||
void add_migration_state_change_notifier(Notifier *notify);
|
||||
void remove_migration_state_change_notifier(Notifier *notify);
|
||||
int get_migration_state(void);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue