qemu-block
[Top][All Lists]
Advanced

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

[Qemu-block] [PATCH v1 1/1] iotests: fix test case 185


From: QingFeng Hao
Subject: [Qemu-block] [PATCH v1 1/1] iotests: fix test case 185
Date: Mon, 19 Mar 2018 10:35:09 +0100

Test case 185 failed since commit 4486e89c219 --- "vl: introduce vm_shutdown()".
It's because of the newly introduced function vm_shutdown calls bdrv_drain_all,
which is called later by bdrv_close_all. bdrv_drain_all resumes the jobs
that doubles the speed and offset is doubled.
Some jobs' status are changed as well.

Thus, let's not call bdrv_drain_all in vm_shutdown.

Signed-off-by: QingFeng Hao <address@hidden>
---
 cpus.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cpus.c b/cpus.c
index 2e6701795b..ae2962508c 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1006,8 +1006,9 @@ static int do_vm_stop(RunState state, bool send_stop)
             qapi_event_send_stop(&error_abort);
         }
     }
-
-    bdrv_drain_all();
+    if (send_stop) {
+        bdrv_drain_all();
+    }
     replay_disable_events();
     ret = bdrv_flush_all();
 
-- 
2.13.5




reply via email to

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