]> git.ipfire.org Git - thirdparty/qemu.git/commit
block: Adjust AioContexts when attaching nodes
authorKevin Wolf <kwolf@redhat.com>
Wed, 24 Apr 2019 15:41:46 +0000 (17:41 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 4 Jun 2019 13:22:22 +0000 (15:22 +0200)
commit132ada80c4a6fea7b67e8bb0a5fd299994d927c6
tree3457b1a3fb7bc3c40ec2d1bbed86b374809ce79f
parent4f71fb436a6fbec7a7b2360cdba741deeb24be67
block: Adjust AioContexts when attaching nodes

So far, we only made sure that updating the AioContext of a node
affected the whole subtree. However, if a node is newly attached to a
new parent, we also need to make sure that both the subtree of the node
and the parent are in the same AioContext. This tries to move the new
child node to the parent AioContext and returns an error if this isn't
possible.

BlockBackends now actually apply their AioContext to their root node.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/block-backend.c
blockjob.c
include/block/block_int.h
tests/test-bdrv-drain.c