summaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2014-11-18 12:21:15 +0100
committerKevin Wolf <kwolf@redhat.com>2014-12-10 10:31:12 +0100
commit2019ba0a0197afc85495546f337345a7150710fc (patch)
treefab452326e9ac2627561c1a3ef20b5db1fc19f84 /include/sysemu
parent2bb0dce76245762dbc0a8fe12516faa127a64e5b (diff)
downloadqemu-2019ba0a0197afc85495546f337345a7150710fc.tar.gz
block: Add AioContextNotifier functions to BB
Because all BlockDriverStates behind a single BlockBackend reside in a single AioContext, it is fine to just pass these functions (blk_add_aio_context_notifier() and blk_remove_aio_context_notifier()) through to the root BlockDriverState. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1416309679-333-3-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/block-backend.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index 0c46b826ca..d9c1337e3f 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -135,6 +135,14 @@ void blk_op_block_all(BlockBackend *blk, Error *reason);
void blk_op_unblock_all(BlockBackend *blk, Error *reason);
AioContext *blk_get_aio_context(BlockBackend *blk);
void blk_set_aio_context(BlockBackend *blk, AioContext *new_context);
+void blk_add_aio_context_notifier(BlockBackend *blk,
+ void (*attached_aio_context)(AioContext *new_context, void *opaque),
+ void (*detach_aio_context)(void *opaque), void *opaque);
+void blk_remove_aio_context_notifier(BlockBackend *blk,
+ void (*attached_aio_context)(AioContext *,
+ void *),
+ void (*detach_aio_context)(void *),
+ void *opaque);
void blk_io_plug(BlockBackend *blk);
void blk_io_unplug(BlockBackend *blk);
BlockAcctStats *blk_get_stats(BlockBackend *blk);