aboutsummaryrefslogtreecommitdiff
path: root/include/migration
diff options
context:
space:
mode:
authorSteve Sistare <steven.sistare@oracle.com>2024-02-22 09:28:33 -0800
committerPeter Xu <peterx@redhat.com>2024-02-28 11:31:28 +0800
commit6835f5a1bc55cabd318cb20ded15a0e8de6d5833 (patch)
tree40622be2d286fe18f81e7597325a745635de10ed /include/migration
parent5663dd3f1a46417742aad7263ef574f4cf6979cf (diff)
migration: per-mode notifiers
Keep a separate list of migration notifiers for each migration mode. Suggested-by: Peter Xu <peterx@redhat.com> Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Link: https://lore.kernel.org/r/1708622920-68779-8-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'include/migration')
-rw-r--r--include/migration/misc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/migration/misc.h b/include/migration/misc.h
index e36a1f3ec4..4dc06a92b7 100644
--- a/include/migration/misc.h
+++ b/include/migration/misc.h
@@ -86,6 +86,12 @@ typedef int (*MigrationNotifyFunc)(NotifierWithReturn *notify,
void migration_add_notifier(NotifierWithReturn *notify,
MigrationNotifyFunc func);
+/*
+ * Same as migration_add_notifier, but applies to be specified @mode.
+ */
+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);
bool migration_in_setup(MigrationState *);