[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 06/11] block: Introduce bdrv_coroutine_enter
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PULL 06/11] block: Introduce bdrv_coroutine_enter |
Date: |
Tue, 11 Apr 2017 20:26:27 +0800 |
Signed-off-by: Fam Zheng <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
---
block.c | 5 +++++
include/block/block.h | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/block.c b/block.c
index a995a8e..086a12d 100644
--- a/block.c
+++ b/block.c
@@ -4324,6 +4324,11 @@ AioContext *bdrv_get_aio_context(BlockDriverState *bs)
return bs->aio_context;
}
+void bdrv_coroutine_enter(BlockDriverState *bs, Coroutine *co)
+{
+ aio_co_enter(bdrv_get_aio_context(bs), co);
+}
+
static void bdrv_do_remove_aio_context_notifier(BdrvAioNotifier *ban)
{
QLIST_REMOVE(ban, list);
diff --git a/include/block/block.h b/include/block/block.h
index 488a07e..97d4330 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -558,6 +558,11 @@ bool bdrv_debug_is_suspended(BlockDriverState *bs, const
char *tag);
AioContext *bdrv_get_aio_context(BlockDriverState *bs);
/**
+ * Transfer control to @co in the aio context of @bs
+ */
+void bdrv_coroutine_enter(BlockDriverState *bs, Coroutine *co);
+
+/**
* bdrv_set_aio_context:
*
* Changes the #AioContext used for fd handlers, timers, and BHs by this
--
2.9.3
- [Qemu-devel] [PULL 00/11] Block patches for 2.9-rc4, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 01/11] block: Make bdrv_parent_drained_begin/end public, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 02/11] block: Quiesce old aio context during bdrv_set_aio_context, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 03/11] tests/block-job-txn: Don't start block job before adding to txn, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 04/11] coroutine: Extract qemu_aio_coroutine_enter, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 05/11] async: Introduce aio_co_enter, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 06/11] block: Introduce bdrv_coroutine_enter,
Fam Zheng <=
- [Qemu-devel] [PULL 07/11] blockjob: Use bdrv_coroutine_enter to start coroutine, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 08/11] qemu-io-cmds: Use bdrv_coroutine_enter, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 09/11] block: Use bdrv_coroutine_enter to start I/O coroutines, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 11/11] sheepdog: Use bdrv_coroutine_enter before BDRV_POLL_WHILE, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 10/11] block: Fix bdrv_co_flush early return, Fam Zheng, 2017/04/11
- Re: [Qemu-devel] [PULL 00/11] Block patches for 2.9-rc4, Peter Maydell, 2017/04/11