aboutsummaryrefslogtreecommitdiff
path: root/block/raw-aio.h
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2014-07-04 18:04:34 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2014-07-07 11:05:17 +0200
commit1b3abdcccf18d98c3952b41be0bc1db3ef6009dd (patch)
tree207b4496a9ab8fb7d19f7860ba59b52b355efcb7 /block/raw-aio.h
parent448ad91db4a560c01f89bd6f7e4bec7d869926a5 (diff)
linux-aio: implement io plug, unplug and flush io queue
This patch implements .bdrv_io_plug, .bdrv_io_unplug and .bdrv_flush_io_queue callbacks for linux-aio Block Drivers, so that submitting I/O as a batch can be supported on linux-aio. [Unprocessed requests are completed with -EIO instead of a bogus ret value. --Stefan] Signed-off-by: Ming Lei <ming.lei@canonical.com> 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 8cf084eeb5..e18c97509a 100644
--- a/block/raw-aio.h
+++ b/block/raw-aio.h
@@ -40,6 +40,8 @@ BlockDriverAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd,
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);
+void laio_io_plug(BlockDriverState *bs, void *aio_ctx);
+int laio_io_unplug(BlockDriverState *bs, void *aio_ctx, bool unplug);
#endif
#ifdef _WIN32