]> git.proxmox.com Git - mirror_qemu.git/blobdiff - block/raw-format.c
python/machine: use connect-based interface for existing sockets
[mirror_qemu.git] / block / raw-format.c
index 918fe4fb7e603da4266019366e9de36a46173e2a..e4f35268e6f3a06e4316b2e708f2db0f2d2f8eae 100644 (file)
@@ -468,6 +468,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
                     Error **errp)
 {
     BDRVRawState *s = bs->opaque;
+    AioContext *ctx;
     bool has_size;
     uint64_t offset, size;
     BdrvChildRole file_role;
@@ -515,7 +516,11 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
                 bs->file->bs->filename);
     }
 
+    ctx = bdrv_get_aio_context(bs);
+    aio_context_acquire(ctx);
     ret = raw_apply_options(bs, s, offset, has_size, size, errp);
+    aio_context_release(ctx);
+
     if (ret < 0) {
         return ret;
     }