diff options
| author | Steve Sistare <steven.sistare@oracle.com> | 2025-10-01 08:33:53 -0700 |
|---|---|---|
| committer | Peter Xu <peterx@redhat.com> | 2025-10-03 09:48:02 -0400 |
| commit | dc79c7d5e15be05b23f24fab12f0d5e2bf831514 (patch) | |
| tree | 4cadbb54e03dcb9be976e4bb5a51baa7be3c8ca1 /include/migration/misc.h | |
| parent | a5bc1ccca9596ecbf57b05bed10bd39e8854e475 (diff) | |
| download | focaccia-qemu-dc79c7d5e15be05b23f24fab12f0d5e2bf831514.tar.gz focaccia-qemu-dc79c7d5e15be05b23f24fab12f0d5e2bf831514.zip | |
migration: multi-mode notifier
Allow a notifier to be added for multiple migration modes. To allow a notifier to appear on multiple per-node lists, use a generic list type. We can no longer use NotifierWithReturnList, because it shoe horns the notifier onto a single list. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/1759332851-370353-2-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 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/migration/misc.h b/include/migration/misc.h index a261f99d89..592b93021e 100644 --- a/include/migration/misc.h +++ b/include/migration/misc.h @@ -95,7 +95,19 @@ void migration_add_notifier(NotifierWithReturn *notify, void migration_add_notifier_mode(NotifierWithReturn *notify, MigrationNotifyFunc func, MigMode mode); +/* + * Same as migration_add_notifier, but applies to all @mode in the argument + * list. The list is terminated by -1 or MIG_MODE_ALL. For the latter, + * the notifier is added for all modes. + */ +void migration_add_notifier_modes(NotifierWithReturn *notify, + MigrationNotifyFunc func, MigMode mode, ...); + +/* + * Remove a notifier from all modes. + */ void migration_remove_notifier(NotifierWithReturn *notify); + void migration_file_set_error(int ret, Error *err); /* True if incoming migration entered POSTCOPY_INCOMING_DISCARD */ |