aboutsummaryrefslogtreecommitdiff
path: root/block/raw-aio.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2014-05-08 16:34:47 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2014-06-04 09:56:11 +0200
commitc2f3426c9bba0195b15a919587f794b110a2dcfc (patch)
tree8d3925475b69cbf07749e59a813288cd9b5e0276 /block/raw-aio.h
parente3625d3d6ae8029fc20262ac3848421ec281446f (diff)
downloadqemu-c2f3426c9bba0195b15a919587f794b110a2dcfc.zip
qemu-c2f3426c9bba0195b15a919587f794b110a2dcfc.tar.gz
qemu-c2f3426c9bba0195b15a919587f794b110a2dcfc.tar.bz2
block/raw-posix: implement .bdrv_detach/attach_aio_context()
Drop the assumption that we're using the main AioContext for Linux AIO. Convert the Linux AIO event notifier to use aio_set_event_notifier(). The .bdrv_detach/attach_aio_context() interfaces also need to be implemented to move the event notifier handler from the old to the new AioContext. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/raw-aio.h')
-rw-r--r--block/raw-aio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/raw-aio.h b/block/raw-aio.h
index 7ad0a8a..9a761ee 100644
--- a/block/raw-aio.h
+++ b/block/raw-aio.h
@@ -37,6 +37,8 @@ void *laio_init(void);
BlockDriverAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque, int type);
+void laio_detach_aio_context(void *s, AioContext *old_context);
+void laio_attach_aio_context(void *s, AioContext *new_context);
#endif
#ifdef _WIN32