On Tue, Sep 12, 2023 at 07:10:37PM -0400, Stefan Hajnoczi wrote: > Use qemu_get_current_aio_context() in mixed wrappers and coroutine > wrappers so that code runs in the caller's AioContext instead of moving > to the BlockDriverState's AioContext. This change is necessary for the > multi-queue block layer where any thread can call into the block layer. > > Most wrappers are IO_CODE where it's safe to use the current AioContext > nowadays. BlockDrivers and the core block layer use their own locks and > no longer depend on the AioContext lock for thread-safety. > > The bdrv_create() wrapper invokes GLOBAL_STATE code. Using the current > AioContext is safe because this code is only called with the BQL held > from the main loop thread. > > The output of qemu-iotests 051 is sensitive to event loop activity. > Update the output because the monitor BH runs at a different time, > causing prompts to be printed differently in the output. > > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> > --- > scripts/block-coroutine-wrapper.py | 6 ++---- > tests/qemu-iotests/051.pc.out | 4 ++-- > 2 files changed, 4 insertions(+), 6 deletions(-) >
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org