From: Alberto Garcia <berto@igalia.com>
To: qemu-devel@nongnu.org
Cc: Alberto Garcia <berto@igalia.com>,
qemu-block@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PATCH 6/6] block: Acquire the AioContext in usb_msd_storage_realize()
Date: Thu, 10 Jan 2019 17:03:40 +0200 [thread overview]
Message-ID: <485e041662e587923855fdc037c88556ce6ea5d1.1547132561.git.berto@igalia.com> (raw)
In-Reply-To: <cover.1547132561.git.berto@igalia.com>
In-Reply-To: <cover.1547132561.git.berto@igalia.com>
Signed-off-by: Alberto Garcia <berto@igalia.com>
---
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
next prev parent reply other threads:[~2019-01-10 15:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-10 15:03 [Qemu-devel] [PATCH 0/6] Acquire the AioContext during _realize() Alberto Garcia
2019-01-10 15:03 ` [Qemu-devel] [PATCH 1/6] block: Acquire the AioContext in virtio_blk_device_realize() Alberto Garcia
2019-01-10 15:03 ` [Qemu-devel] [PATCH 2/6] block: Acquire the AioContext in scsi_*_realize() Alberto Garcia
2019-01-11 15:02 ` Kevin Wolf
2019-01-11 15:05 ` Alberto Garcia
2019-01-11 15:14 ` Kevin Wolf
2019-01-10 15:03 ` [Qemu-devel] [PATCH 3/6] block: Acquire the AioContext in floppy_drive_realize() Alberto Garcia
2019-01-10 15:03 ` [Qemu-devel] [PATCH 4/6] block: Acquire the AioContext in nvme_realize() Alberto Garcia
2019-01-10 15:03 ` [Qemu-devel] [PATCH 5/6] block: Acquire the AioContext in ide_dev_initfn() Alberto Garcia
2019-01-10 15:03 ` Alberto Garcia [this message]
2019-01-11 13:20 ` [Qemu-devel] [PATCH 0/6] Acquire the AioContext during _realize() Markus Armbruster
2019-01-11 15:09 ` Kevin Wolf
2019-01-11 15:13 ` Alberto Garcia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=485e041662e587923855fdc037c88556ce6ea5d1.1547132561.git.berto@igalia.com \
--to=berto@igalia.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.