Skip to content

Commit

Permalink
block: convert bdrv_drain_all_begin() to AIO_WAIT_WHILE_UNLOCKED()
Browse files Browse the repository at this point in the history
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é <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230309190855.414275-5-stefanha@redhat.com>
Reviewed-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
stefanhaRH authored and kevmw committed Apr 25, 2023
1 parent d805d8a commit 263d5e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ void bdrv_drain_all_begin(void)
bdrv_drain_all_begin_nopoll();

/* Now poll the in-flight requests */
AIO_WAIT_WHILE(NULL, bdrv_drain_all_poll());
AIO_WAIT_WHILE_UNLOCKED(NULL, bdrv_drain_all_poll());

while ((bs = bdrv_next_all_states(bs))) {
bdrv_drain_assert_idle(bs);
Expand Down

0 comments on commit 263d5e1

Please sign in to comment.