This command allows mapping block node names to aliases for the purpose
of block dirty bitmap migration.
This way, management tools can use different node names on the source
and destination and pass the mapping of how bitmaps are to be
transferred to qemu (on the source, the destination, or even both with
arbitrary aliases in the migration stream).
Suggested-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
@@ -713,6 +731,44 @@ static bool dirty_bitmap_has_postcopy(void *opaque)
return true;
}
+void qmp_migrate_set_bitmap_node_mapping(MigrationBlockNodeMappingList *mapping,
+ Error **errp)
+{
+ QDict *in_mapping = qdict_new();
+ QDict *out_mapping = qdict_new();
+
+ for (; mapping; mapping = mapping->next) {
+ MigrationBlockNodeMapping *entry = mapping->value;
+
+ if (qdict_haskey(out_mapping, entry->node_name)) {
+ error_setg(errp, "Cannot map node name '%s' twice",
+ entry->node_name);
+ goto fail;
+ }