summaryrefslogtreecommitdiffstats
path: root/hw/ide
diff options
context:
space:
mode:
authorKevin Wolf2019-04-25 14:25:10 +0200
committerKevin Wolf2019-06-04 15:22:22 +0200
commitd861ab3acf8dcf817e0c2335979b258847b69564 (patch)
tree9e334e6976355a7a262e3a9200354008195becfc /hw/ide
parentblock: Add Error to blk_set_aio_context() (diff)
downloadqemu-d861ab3acf8dcf817e0c2335979b258847b69564.tar.gz
qemu-d861ab3acf8dcf817e0c2335979b258847b69564.tar.xz
qemu-d861ab3acf8dcf817e0c2335979b258847b69564.zip
block: Add BlockBackend.ctx
This adds a new parameter to blk_new() which requires its callers to declare from which AioContext this BlockBackend is going to be used (or the locks of which AioContext need to be taken anyway). The given context is only stored and kept up to date when changing AioContexts. Actually applying the stored AioContext to the root node is saved for another commit. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide')
-rw-r--r--hw/ide/qdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 573b022e1e..360cd20bd8 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -168,7 +168,7 @@ static void ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind, Error **errp)
return;
} else {
/* Anonymous BlockBackend for an empty drive */
- dev->conf.blk = blk_new(0, BLK_PERM_ALL);
+ dev->conf.blk = blk_new(qemu_get_aio_context(), 0, BLK_PERM_ALL);
ret = blk_attach_dev(dev->conf.blk, &dev->qdev);
assert(ret == 0);
}