[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 6/6] block: Acquire the AioContext in usb_msd_storag
From: |
Alberto Garcia |
Subject: |
[Qemu-devel] [PATCH 6/6] block: Acquire the AioContext in usb_msd_storage_realize() |
Date: |
Thu, 10 Jan 2019 17:03:40 +0200 |
Signed-off-by: Alberto Garcia <address@hidden>
---
hw/usb/dev-storage.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index cd5551d94f..fa6e552f0f 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -593,13 +593,18 @@ static void usb_msd_storage_realize(USBDevice *dev, Error
**errp)
MSDState *s = USB_STORAGE_DEV(dev);
BlockBackend *blk = s->conf.blk;
SCSIDevice *scsi_dev;
+ AioContext *ctx;
if (!blk) {
error_setg(errp, "drive property not set");
return;
}
+ ctx = blk_get_aio_context(blk);
+ aio_context_acquire(ctx);
blkconf_blocksizes(&s->conf);
+ aio_context_release(ctx);
+
if (!blkconf_apply_backend_options(&s->conf, blk_is_read_only(blk), true,
errp)) {
return;
--
2.11.0
- [Qemu-devel] [PATCH 0/6] Acquire the AioContext during _realize(), Alberto Garcia, 2019/01/10
- [Qemu-devel] [PATCH 5/6] block: Acquire the AioContext in ide_dev_initfn(), Alberto Garcia, 2019/01/10
- [Qemu-devel] [PATCH 1/6] block: Acquire the AioContext in virtio_blk_device_realize(), Alberto Garcia, 2019/01/10
- Re: [Qemu-devel] [PATCH 0/6] Acquire the AioContext during _realize(), Markus Armbruster, 2019/01/11
- Re: [Qemu-devel] [PATCH 0/6] Acquire the AioContext during _realize(), Kevin Wolf, 2019/01/11