From: Zhi Yong Wu <wu...@linux.vnet.ibm.com>

The patch is based on the latest QEMU upstream. If you will backport the 
patchset to QEMU 1.0, pls note the difference.

Signed-off-by: Zhi Yong Wu <wu...@linux.vnet.ibm.com>
---
 block.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/block.c b/block.c
index ae297bb..07cd143 100644
--- a/block.c
+++ b/block.c
@@ -863,6 +863,12 @@ void bdrv_drain_all(void)
 {
     BlockDriverState *bs;
 
+    QTAILQ_FOREACH(bs, &bdrv_states, list) {
+        if (!qemu_co_queue_empty(&bs->throttled_reqs)) {
+            qemu_co_queue_restart_all(&bs->throttled_reqs);
+        }
+    }
+
     qemu_aio_flush();
 
     /* If requests are still pending there is a bug somewhere */
-- 
1.7.6


Reply via email to