summaryrefslogtreecommitdiff
path: root/include/block/aio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/block/aio.h')
-rw-r--r--include/block/aio.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/block/aio.h b/include/block/aio.h
index 88a64eeb3c..209551deb2 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -47,6 +47,9 @@ typedef struct AioHandler AioHandler;
typedef void QEMUBHFunc(void *opaque);
typedef void IOHandler(void *opaque);
+struct ThreadPool;
+struct LinuxAioState;
+
struct AioContext {
GSource source;
@@ -119,6 +122,13 @@ struct AioContext {
/* Thread pool for performing work and receiving completion callbacks */
struct ThreadPool *thread_pool;
+#ifdef CONFIG_LINUX_AIO
+ /* State for native Linux AIO. Uses aio_context_acquire/release for
+ * locking.
+ */
+ struct LinuxAioState *linux_aio;
+#endif
+
/* TimerLists for calling timers - one per clock type */
QEMUTimerListGroup tlg;
@@ -335,6 +345,9 @@ GSource *aio_get_g_source(AioContext *ctx);
/* Return the ThreadPool bound to this AioContext */
struct ThreadPool *aio_get_thread_pool(AioContext *ctx);
+/* Return the LinuxAioState bound to this AioContext */
+struct LinuxAioState *aio_get_linux_aio(AioContext *ctx);
+
/**
* aio_timer_new:
* @ctx: the aio context
@@ -439,6 +452,6 @@ static inline bool aio_node_check(AioContext *ctx, bool is_external)
*
* Initialize the aio context.
*/
-void aio_context_setup(AioContext *ctx, Error **errp);
+void aio_context_setup(AioContext *ctx);
#endif