]> git.proxmox.com Git - mirror_qemu.git/commit
block: Add bdrv_try_set_aio_context()
authorKevin Wolf <kwolf@redhat.com>
Mon, 6 May 2019 17:17:56 +0000 (19:17 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 20 May 2019 15:08:56 +0000 (17:08 +0200)
commit5d2318499fe980542fbc21d9ccbc127a6106017b
treeb69b4502f4d658bee21e7642c451eda22e15297a
parent25349e8250e67e7d126fbf0ad213811b62e7e529
block: Add bdrv_try_set_aio_context()

Eventually, we want to make sure that all parents and all children of a
node are in the same AioContext as the node itself. This means that
changing the AioContext may fail because one of the other involved
parties (e.g. a guest device that was configured with an iothread)
cannot allow switching to a different AioContext.

Introduce a set of functions that allow to first check whether all
involved nodes can switch to a new context and only then do the actual
switch. The check recursively covers children and parents.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
include/block/block.h
include/block/block_int.h