aboutsummaryrefslogtreecommitdiff
path: root/include/block/aio.h
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-03-15 10:47:21 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-03-15 10:47:21 -0500
commitdc0b0616f726956001be09e9a65a6e0b0bd939db (patch)
tree9b5e0b67bafa20803a8a70b1e04dbbf1cf762a84 /include/block/aio.h
parentd4d7682484f339d70355b165a15f8f5e83638e40 (diff)
parent3618a094022e984d4e045c6db21aed961b7c6fc9 (diff)
Merge remote-tracking branch 'stefanha/block' into staging
# By Stefan Hajnoczi (14) and others # Via Stefan Hajnoczi * stefanha/block: (28 commits) blockdev: Fix up copyright and permission notice qemu-iotests: use -nographic in test case 007 qemu-iotests: add tests for rebasing zero clusters dataplane: fix hang introduced by AioContext transition coroutine: use AioContext for CoQueue BH threadpool: drop global thread pool block: add bdrv_get_aio_context() aio: add a ThreadPool instance to AioContext threadpool: add thread_pool_new() and thread_pool_free() threadpool: move globals into struct ThreadPool main-loop: add qemu_get_aio_context() sheepdog: set io_flush handler in do_co_req sheepdog: use non-blocking fd in coroutine context qcow2: make is_allocated return true for zero clusters qcow2: drop unnecessary flush in qcow2_update_snapshot_refcount() qcow2: drop flush in update_cluster_refcount() qcow2: flush in qcow2_update_snapshot_refcount() qcow2: set L2 cache dependency in qcow2_alloc_bytes() qcow2: flush refcount cache correctly in qcow2_write_snapshots() qcow2: flush refcount cache correctly in alloc_refcount_block() ...
Diffstat (limited to 'include/block/aio.h')
-rw-r--r--include/block/aio.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/block/aio.h b/include/block/aio.h
index 5b54d383fc..183679374f 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -66,6 +66,9 @@ typedef struct AioContext {
/* GPollFDs for aio_poll() */
GArray *pollfds;
+
+ /* Thread pool for performing work and receiving completion callbacks */
+ struct ThreadPool *thread_pool;
} AioContext;
/* Returns 1 if there are still outstanding AIO requests; 0 otherwise */
@@ -223,6 +226,9 @@ void aio_set_event_notifier(AioContext *ctx,
*/
GSource *aio_get_g_source(AioContext *ctx);
+/* Return the ThreadPool bound to this AioContext */
+struct ThreadPool *aio_get_thread_pool(AioContext *ctx);
+
/* Functions to operate on the main QEMU AioContext. */
bool qemu_aio_wait(void);