qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 7/9] block: Fix BDS children's .drained_end()


From: Max Reitz
Subject: [Qemu-devel] [PATCH v2 7/9] block: Fix BDS children's .drained_end()
Date: Wed, 19 Jun 2019 17:26:01 +0200

BdrvChildRole.drained_end() must not poll, bdrv_child_cb_drained_end()
should use bdrv_drained_end_no_poll() instead of bdrv_drained_end().

The existing implementation works perfectly well for
.drained_end_unquiesce(), though, so use it there.

Signed-off-by: Max Reitz <address@hidden>
---
 block.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/block.c b/block.c
index 31b85df0f0..1652f3d29b 100644
--- a/block.c
+++ b/block.c
@@ -912,6 +912,12 @@ static bool bdrv_child_cb_drained_poll(BdrvChild *child)
 }
 
 static void bdrv_child_cb_drained_end(BdrvChild *child)
+{
+    BlockDriverState *bs = child->opaque;
+    bdrv_drained_end_no_poll(bs);
+}
+
+static void bdrv_child_cb_drained_end_unquiesce(BdrvChild *child)
 {
     BlockDriverState *bs = child->opaque;
     bdrv_drained_end(bs);
@@ -1014,6 +1020,7 @@ const BdrvChildRole child_file = {
     .drained_begin   = bdrv_child_cb_drained_begin,
     .drained_poll    = bdrv_child_cb_drained_poll,
     .drained_end     = bdrv_child_cb_drained_end,
+    .drained_end_unquiesce = bdrv_child_cb_drained_end_unquiesce,
     .attach          = bdrv_child_cb_attach,
     .detach          = bdrv_child_cb_detach,
     .inactivate      = bdrv_child_cb_inactivate,
@@ -1042,6 +1049,7 @@ const BdrvChildRole child_format = {
     .drained_begin   = bdrv_child_cb_drained_begin,
     .drained_poll    = bdrv_child_cb_drained_poll,
     .drained_end     = bdrv_child_cb_drained_end,
+    .drained_end_unquiesce = bdrv_child_cb_drained_end_unquiesce,
     .attach          = bdrv_child_cb_attach,
     .detach          = bdrv_child_cb_detach,
     .inactivate      = bdrv_child_cb_inactivate,
@@ -1168,6 +1176,7 @@ const BdrvChildRole child_backing = {
     .drained_begin   = bdrv_child_cb_drained_begin,
     .drained_poll    = bdrv_child_cb_drained_poll,
     .drained_end     = bdrv_child_cb_drained_end,
+    .drained_end_unquiesce = bdrv_child_cb_drained_end_unquiesce,
     .inactivate      = bdrv_child_cb_inactivate,
     .update_filename = bdrv_backing_update_filename,
     .can_set_aio_ctx = bdrv_child_cb_can_set_aio_ctx,
-- 
2.21.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]