aboutsummaryrefslogtreecommitdiff
path: root/migration/block-dirty-bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'migration/block-dirty-bitmap.c')
-rw-r--r--migration/block-dirty-bitmap.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c
index a6ffae0002..6624f39bc6 100644
--- a/migration/block-dirty-bitmap.c
+++ b/migration/block-dirty-bitmap.c
@@ -605,11 +605,12 @@ static int init_dirty_bitmap_migration(DBMSaveState *s)
SaveBitmapState *dbms;
GHashTable *handled_by_blk = g_hash_table_new(NULL, NULL);
BlockBackend *blk;
- const MigrationParameters *mig_params = &migrate_get_current()->parameters;
GHashTable *alias_map = NULL;
+ const BitmapMigrationNodeAliasList *block_bitmap_mapping =
+ migrate_block_bitmap_mapping();
- if (mig_params->has_block_bitmap_mapping) {
- alias_map = construct_alias_map(mig_params->block_bitmap_mapping, true,
+ if (block_bitmap_mapping) {
+ alias_map = construct_alias_map(block_bitmap_mapping, true,
&error_abort);
}
@@ -1158,7 +1159,8 @@ static int dirty_bitmap_load_header(QEMUFile *f, DBMLoadState *s,
static int dirty_bitmap_load(QEMUFile *f, void *opaque, int version_id)
{
GHashTable *alias_map = NULL;
- const MigrationParameters *mig_params = &migrate_get_current()->parameters;
+ const BitmapMigrationNodeAliasList *block_bitmap_mapping =
+ migrate_block_bitmap_mapping();
DBMLoadState *s = &((DBMState *)opaque)->load;
int ret = 0;
@@ -1170,8 +1172,8 @@ static int dirty_bitmap_load(QEMUFile *f, void *opaque, int version_id)
return -EINVAL;
}
- if (mig_params->has_block_bitmap_mapping) {
- alias_map = construct_alias_map(mig_params->block_bitmap_mapping,
+ if (block_bitmap_mapping) {
+ alias_map = construct_alias_map(block_bitmap_mapping,
false, &error_abort);
}