[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 22/28] block: add bdrv_get_aio_context()
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 22/28] block: add bdrv_get_aio_context() |
Date: |
Fri, 15 Mar 2013 16:14:19 +0100 |
For now bdrv_get_aio_context() is just a stub that calls
qemu_aio_get_context() since the block layer is currently tied to the
main loop AioContext.
Add the stub now so that the block layer can begin accessing its
AioContext.
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
---
block.c | 6 ++++++
include/block/block_int.h | 7 +++++++
2 files changed, 13 insertions(+)
diff --git a/block.c b/block.c
index 0ab164d..037e15e 100644
--- a/block.c
+++ b/block.c
@@ -4681,3 +4681,9 @@ out:
bdrv_delete(bs);
}
}
+
+AioContext *bdrv_get_aio_context(BlockDriverState *bs)
+{
+ /* Currently BlockDriverState always uses the main loop AioContext */
+ return qemu_get_aio_context();
+}
diff --git a/include/block/block_int.h b/include/block/block_int.h
index baf80e3..ce0aa26 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -294,6 +294,13 @@ int get_tmp_filename(char *filename, int size);
void bdrv_set_io_limits(BlockDriverState *bs,
BlockIOLimit *io_limits);
+/**
+ * bdrv_get_aio_context:
+ *
+ * Returns: the currently bound #AioContext
+ */
+AioContext *bdrv_get_aio_context(BlockDriverState *bs);
+
#ifdef _WIN32
int is_windows_drive(const char *filename);
#endif
--
1.8.1.4
- [Qemu-devel] [PATCH 07/28] block: Support driver specific options in drive_init(), (continued)
- [Qemu-devel] [PATCH 07/28] block: Support driver specific options in drive_init(), Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 14/28] qcow2: drop unnecessary flush in qcow2_update_snapshot_refcount(), Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 06/28] blockdev: Keep a copy of DriveInfo.serial, Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 12/28] qcow2: flush in qcow2_update_snapshot_refcount(), Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 13/28] qcow2: drop flush in update_cluster_refcount(), Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 15/28] qcow2: make is_allocated return true for zero clusters, Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 16/28] sheepdog: use non-blocking fd in coroutine context, Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 17/28] sheepdog: set io_flush handler in do_co_req, Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 19/28] threadpool: move globals into struct ThreadPool, Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 20/28] threadpool: add thread_pool_new() and thread_pool_free(), Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 22/28] block: add bdrv_get_aio_context(),
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 18/28] main-loop: add qemu_get_aio_context(), Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 21/28] aio: add a ThreadPool instance to AioContext, Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 24/28] coroutine: use AioContext for CoQueue BH, Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 25/28] dataplane: fix hang introduced by AioContext transition, Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 26/28] qemu-iotests: add tests for rebasing zero clusters, Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 28/28] blockdev: Fix up copyright and permission notice, Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 27/28] qemu-iotests: use -nographic in test case 007, Stefan Hajnoczi, 2013/03/15
- [Qemu-devel] [PATCH 23/28] threadpool: drop global thread pool, Stefan Hajnoczi, 2013/03/15
- Re: [Qemu-devel] [PULL 00/28] Block patches, Anthony Liguori, 2013/03/15