diff options
Diffstat (limited to 'migration/migration.c')
-rw-r--r-- | migration/migration.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/migration/migration.c b/migration/migration.c index 221b22c5d8..67f9e68f2e 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -115,6 +115,11 @@ MigrationState *migrate_get_current(void) return current_migration; } +void migration_only_migratable_set(void) +{ + migrate_get_current()->only_migratable = true; +} + MigrationIncomingState *migration_incoming_get_current(void) { static bool once; @@ -986,7 +991,7 @@ static GSList *migration_blockers; int migrate_add_blocker(Error *reason, Error **errp) { - if (only_migratable) { + if (migrate_get_current()->only_migratable) { error_propagate(errp, error_copy(reason)); error_prepend(errp, "disallowing migration blocker " "(--only_migratable) for: "); @@ -1979,6 +1984,7 @@ void migrate_fd_connect(MigrationState *s) static Property migration_properties[] = { DEFINE_PROP_BOOL("store-global-state", MigrationState, store_global_state, true), + DEFINE_PROP_BOOL("only-migratable", MigrationState, only_migratable, false), DEFINE_PROP_END_OF_LIST(), }; |