diff options
Diffstat (limited to 'block/parallels.c')
-rw-r--r-- | block/parallels.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/parallels.c b/block/parallels.c index 9b9bd1f993..a04f836cc2 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -1255,6 +1255,8 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags, return ret; } + GRAPH_RDLOCK_GUARD_MAINLOOP(); + file_nb_sectors = bdrv_nb_sectors(bs->file->bs); if (file_nb_sectors < 0) { return -EINVAL; @@ -1359,11 +1361,9 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags, bitmap_new(DIV_ROUND_UP(s->header_size, s->bat_dirty_block)); /* Disable migration until bdrv_activate method is added */ - bdrv_graph_rdlock_main_loop(); error_setg(&s->migration_blocker, "The Parallels 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_normal(&s->migration_blocker, errp); if (ret < 0) { |