Re: [PATCH v2 3/6] block: convert bdrv_graph_wrlock() to AIO_WAIT_WHILE_UNLOCKED()

2023-03-12 Thread Wilfred Mallawa
On Thu, 2023-03-09 at 14:08 -0500, Stefan Hajnoczi wrote: > The following conversion is safe and does not change behavior: > > GLOBAL_STATE_CODE(); > ... >   -  AIO_WAIT_WHILE(qemu_get_aio_context(), ...); >   +  AIO_WAIT_WHILE_UNLOCKED(NULL, ...); > > Since we're in

[PATCH v2 3/6] block: convert bdrv_graph_wrlock() to AIO_WAIT_WHILE_UNLOCKED()

2023-03-09 Thread Stefan Hajnoczi
The following conversion is safe and does not change behavior: GLOBAL_STATE_CODE(); ... - AIO_WAIT_WHILE(qemu_get_aio_context(), ...); + AIO_WAIT_WHILE_UNLOCKED(NULL, ...); Since we're in GLOBAL_STATE_CODE(), qemu_get_aio_context() is our home thread's AioContext. Thus