qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 34/47] virtio-blk: Schedule BH in the right context


From: Kevin Wolf
Subject: [Qemu-devel] [PULL 34/47] virtio-blk: Schedule BH in the right context
Date: Fri, 27 Jun 2014 21:08:53 +0200

From: Fam Zheng <address@hidden>

The BH must be called in the AioContext of bs. Currently it is only the
main loop, but with coming changes, it could also be a dataplane
IOThread.

Signed-off-by: Fam Zheng <address@hidden>
Tested-by: Paolo Bonzini <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 hw/block/virtio-blk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 77fb447..a222e3f 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -469,7 +469,8 @@ static void virtio_blk_dma_restart_cb(void *opaque, int 
running,
     }
 
     if (!s->bh) {
-        s->bh = qemu_bh_new(virtio_blk_dma_restart_bh, s);
+        s->bh = aio_bh_new(bdrv_get_aio_context(s->blk.conf.bs),
+                           virtio_blk_dma_restart_bh, s);
         qemu_bh_schedule(s->bh);
     }
 }
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]