Am 23.05.2019 um 18:00 hat Kevin Wolf geschrieben: > Recently, a few bugs were reported that resulted from an inconsistent > state regarding AioContexts. Block nodes can end up in different > contexts than their users expect - the AioContext of a node can even > change under the feet of a device with no way for the device to forbid > this. We recently added a few basic checks to scsi-disk and virtio-blk, > but they are by far not enough. > > Part 1 solved the first half of the problem and made sure that > AioContext changes are propagated through the graph as necessary, so > that a bdrv_set_aio_context() correctly pulls everything that uses the > node into the right context. > > This is part 2 that fixes the second half: Attaching new child nodes > where the parent and child are already in different AioContexts. This > operation may only succeed if we can move one of the node into the > context of the other node. > > After applying this series, unchecked bdrv_set_aio_context() doesn't > exist any more and all users call functions that make sure that the > AioContext assignments across the graph stays consistent.
Applied to the block branch. Kevin