[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 06/42] blkdebug: use BlockDriverState's AioContext
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 06/42] blkdebug: use BlockDriverState's AioContext |
Date: |
Fri, 6 Jun 2014 18:13:27 +0200 |
Drop the assumption that we're using the main AioContext. Convert
qemu_bh_new() to aio_bh_new() so we use the BlockDriverState's
AioContext.
The .bdrv_detach_aio_context() and .bdrv_attach_aio_context() interfaces
are not needed since no fd handlers, timers, or BHs stay registered when
requests have been drained.
Cc: Kevin Wolf <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
block/blkdebug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 380c736..f51407d 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -471,7 +471,7 @@ static BlockDriverAIOCB *inject_error(BlockDriverState *bs,
acb = qemu_aio_get(&blkdebug_aiocb_info, bs, cb, opaque);
acb->ret = -error;
- bh = qemu_bh_new(error_callback_bh, acb);
+ bh = aio_bh_new(bdrv_get_aio_context(bs), error_callback_bh, acb);
acb->bh = bh;
qemu_bh_schedule(bh);
--
1.9.3
- [Qemu-devel] [PULL 00/42] Block patches, Stefan Hajnoczi, 2014/06/06
- [Qemu-devel] [PULL 01/42] aio: fix qemu_bh_schedule() bh->ctx race condition, Stefan Hajnoczi, 2014/06/06
- [Qemu-devel] [PULL 03/42] block: acquire AioContext in bdrv_*_all(), Stefan Hajnoczi, 2014/06/06
- [Qemu-devel] [PULL 02/42] block: use BlockDriverState AioContext, Stefan Hajnoczi, 2014/06/06
- [Qemu-devel] [PULL 04/42] block: acquire AioContext in bdrv_drain_all(), Stefan Hajnoczi, 2014/06/06
- [Qemu-devel] [PULL 06/42] blkdebug: use BlockDriverState's AioContext,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 08/42] curl: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/06/06
- [Qemu-devel] [PULL 07/42] blkverify: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/06/06
- [Qemu-devel] [PULL 05/42] block: add bdrv_set_aio_context(), Stefan Hajnoczi, 2014/06/06
- [Qemu-devel] [PULL 09/42] gluster: use BlockDriverState's AioContext, Stefan Hajnoczi, 2014/06/06
- [Qemu-devel] [PULL 11/42] nbd: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/06/06
- [Qemu-devel] [PULL 10/42] iscsi: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/06/06
- [Qemu-devel] [PULL 12/42] nfs: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/06/06
- [Qemu-devel] [PULL 14/42] quorum: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/06/06
- [Qemu-devel] [PULL 13/42] qed: use BlockDriverState's AioContext, Stefan Hajnoczi, 2014/06/06
- [Qemu-devel] [PULL 15/42] block/raw-posix: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/06/06