[PATCH v2] include/block: fixup typos

2023-03-12 Thread Wilfred Mallawa
From: Wilfred Mallawa Fixup a few minor typos Signed-off-by: Wilfred Mallawa --- v2: - Fixup typo in commit msg. include/block/aio-wait.h | 2 +- include/block/block_int-common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/block/aio-wait.h b/inclu

[PATCH] include/blcok: fixup typos

2023-03-12 Thread Wilfred Mallawa
From: Wilfred Mallawa Fixup a few minor typos Signed-off-by: Wilfred Mallawa --- include/block/aio-wait.h | 2 +- include/block/block_int-common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/block/aio-wait.h b/include/block/aio-wait.h index da13357bb8

Re: [PATCH v2 6/6] monitor: convert monitor_cleanup() to AIO_WAIT_WHILE_UNLOCKED()

2023-03-12 Thread Wilfred Mallawa
On Thu, 2023-03-09 at 14:08 -0500, Stefan Hajnoczi wrote: > monitor_cleanup() is called from the main loop thread. Calling > AIO_WAIT_WHILE(qemu_get_aio_context(), ...) from the main loop thread > is > equivalent to AIO_WAIT_WHILE_UNLOCKED(NULL, ...) because neither > unlocks > the AioContext and t

Re: [PATCH v2 5/6] hmp: convert handle_hmp_command() to AIO_WAIT_WHILE_UNLOCKED()

2023-03-12 Thread Wilfred Mallawa
On Thu, 2023-03-09 at 14:08 -0500, Stefan Hajnoczi wrote: > The HMP monitor runs in the main loop thread. Calling > AIO_WAIT_WHILE(qemu_get_aio_context(), ...) from the main loop thread > is > equivalent to AIO_WAIT_WHILE_UNLOCKED(NULL, ...) because neither > unlocks > the AioContext and the latter

Re: [PATCH v2 4/6] block: convert bdrv_drain_all_begin() to AIO_WAIT_WHILE_UNLOCKED()

2023-03-12 Thread Wilfred Mallawa
On Thu, 2023-03-09 at 14:08 -0500, Stefan Hajnoczi wrote: > Since the AioContext argument was already NULL, AIO_WAIT_WHILE() was > never going to unlock the AioContext. Therefore it is possible to > replace AIO_WAIT_WHILE() with AIO_WAIT_WHILE_UNLOCKED(). > > Reviewed-by: Philippe Mathieu-Daudé >

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 GLOBAL_STATE_CODE()

Re: [PATCH v2 2/6] block: convert blk_exp_close_all_type() to AIO_WAIT_WHILE_UNLOCKED()

2023-03-12 Thread Wilfred Mallawa
On Thu, 2023-03-09 at 14:08 -0500, Stefan Hajnoczi wrote: > There is no change in behavior. Switch to AIO_WAIT_WHILE_UNLOCKED() > instead of AIO_WAIT_WHILE() to document that this code has already > been > audited and converted. The AioContext argument is already NULL so > aio_context_release() is

Re: [PATCH v2 1/6] block: don't acquire AioContext lock in bdrv_drain_all()

2023-03-12 Thread Wilfred Mallawa
On Thu, 2023-03-09 at 14:08 -0500, Stefan Hajnoczi wrote: > There is no need for the AioContext lock in bdrv_drain_all() because > nothing in AIO_WAIT_WHILE() needs the lock and the condition is > atomic. > > AIO_WAIT_WHILE_UNLOCKED() has no use for the AioContext parameter > other > than performi

Re: [PULL 0/3] Block layer patches

2023-03-12 Thread Peter Maydell
On Fri, 10 Mar 2023 at 17:55, Kevin Wolf wrote: > > The following changes since commit ee59483267de29056b5b2ee2421ef3844e5c9932: > > Merge tag 'qemu-openbios-20230307' of https://github.com/mcayland/qemu into > staging (2023-03-09 16:55:03 +) > > are available in the Git repository at: > >