From 97896a4887a0a29c3314c5f0e9a82e269a6401fc Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 2 May 2019 11:10:59 +0200 Subject: block: Add Error to blk_set_aio_context() Add an Error parameter to blk_set_aio_context() and use bdrv_child_try_set_aio_context() internally to check whether all involved nodes can actually support the AioContext switch. Signed-off-by: Kevin Wolf --- include/sysemu/block-backend.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/sysemu') diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 938de34fe9..228fb3fb83 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -208,7 +208,8 @@ void blk_op_unblock(BlockBackend *blk, BlockOpType op, Error *reason); 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); +int blk_set_aio_context(BlockBackend *blk, AioContext *new_context, + Error **errp); 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); -- cgit v1.2.3