]> git.proxmox.com Git - mirror_qemu.git/blobdiff - block/vpc.c
block: Mark bdrv_get_parent_name() and callers GRAPH_RDLOCK
[mirror_qemu.git] / block / vpc.c
index ceb87dd3d8e208dfa38032a0ba9b9ea8fc898c1f..945847fe4a840f0f4f6b3b1a2ef1d42bbaecbc4e 100644 (file)
@@ -446,9 +446,12 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
     }
 
     /* Disable migration when VHD images are used */
+    bdrv_graph_rdlock_main_loop();
     error_setg(&s->migration_blocker, "The vpc format used by node '%s' "
                "does not support live migration",
                bdrv_get_device_or_node_name(bs));
+    bdrv_graph_rdunlock_main_loop();
+
     ret = migrate_add_blocker(s->migration_blocker, errp);
     if (ret < 0) {
         error_free(s->migration_blocker);