On Mon 28 Jan 2019 03:57:43 PM CET, Kevin Wolf wrote:

>> > I think the proper solution on the block layer level would be that
>> > AioContext is managed per BdrvChild and only BdrvChild objects with
>> > the same AioContext can be attached to the same node.
>> > bdrv_set_aio_context() would then fail if another parent is already
>> > using the node.
>> 
>> How would that solve the virtio-blk problem, though? :-?
>
> It wouldn't, but it would make clear that bdrv_set_aio_context() can
> fail and we'd have to handle the problem exactly there.

Yes, that sound like the proper solution.

> The only other option I see is downgrading to non-dataplane mode, but
> this would have to be silent because during machine reset we have no
> way to report errors.

Yes, I actually had a patch doing that, but as you said the user has no
way of knowing that it went wrong.

If you have 2 or 3 virtio-blk devices with different iothreads using the
same BDS then after the guest reboot only one would succeed, but you
can't see which one, or can you?

Berto

Reply via email to