[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/6] block: convert bdrv_drain_all_begin() to AIO_WAIT_WHILE_UNLO
From: |
Stefan Hajnoczi |
Subject: |
[PATCH 4/6] block: convert bdrv_drain_all_begin() to AIO_WAIT_WHILE_UNLOCKED() |
Date: |
Wed, 1 Mar 2023 15:57:59 -0500 |
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().
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
block/io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/io.c b/block/io.c
index 8974d46941..db438c7657 100644
--- a/block/io.c
+++ b/block/io.c
@@ -520,7 +520,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);
--
2.39.2
- [PATCH 1/6] block: don't acquire AioContext lock in bdrv_drain_all(), (continued)
- [PATCH 1/6] block: don't acquire AioContext lock in bdrv_drain_all(), Stefan Hajnoczi, 2023/03/01
- Re: [PATCH 1/6] block: don't acquire AioContext lock in bdrv_drain_all(), Kevin Wolf, 2023/03/07
- Re: [PATCH 1/6] block: don't acquire AioContext lock in bdrv_drain_all(), Stefan Hajnoczi, 2023/03/07
- Re: [PATCH 1/6] block: don't acquire AioContext lock in bdrv_drain_all(), Kevin Wolf, 2023/03/08
- Re: [PATCH 1/6] block: don't acquire AioContext lock in bdrv_drain_all(), Stefan Hajnoczi, 2023/03/08
- Re: [PATCH 1/6] block: don't acquire AioContext lock in bdrv_drain_all(), Kevin Wolf, 2023/03/08
- Re: [PATCH 1/6] block: don't acquire AioContext lock in bdrv_drain_all(), Stefan Hajnoczi, 2023/03/09
[PATCH 3/6] block: convert bdrv_graph_wrlock() to AIO_WAIT_WHILE_UNLOCKED(), Stefan Hajnoczi, 2023/03/01
[PATCH 4/6] block: convert bdrv_drain_all_begin() to AIO_WAIT_WHILE_UNLOCKED(),
Stefan Hajnoczi <=
[PATCH 5/6] hmp: convert handle_hmp_command() to AIO_WAIT_WHILE_UNLOCKED(), Stefan Hajnoczi, 2023/03/01
Re: [PATCH 5/6] hmp: convert handle_hmp_command() to AIO_WAIT_WHILE_UNLOCKED(), Philippe Mathieu-Daudé, 2023/03/07
[PATCH 6/6] monitor: convert monitor_cleanup() to AIO_WAIT_WHILE_UNLOCKED(), Stefan Hajnoczi, 2023/03/01