Patchwork [02/12] Handle BH's queued by AIO completions in qemu_aio_flush()

login
register
mail settings
Submitter Glauber Costa
Date Aug. 26, 2009, 1:05 p.m.
Message ID <1251291946-25821-3-git-send-email-glommer@redhat.com>
Download mbox | patch
Permalink /patch/32159/
State Superseded
Headers show

Comments

Glauber Costa - Aug. 26, 2009, 1:05 p.m.
From: Nolan <nolan@sigbus.net>

Without this, the call to qemu_aio_flush during migration doesn't
actually flush all in-flight SCSI IOs.

Signed-off-by: Nolan Leake <nolan <at> sigbus.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 aio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/aio.c b/aio.c
index dc9b85d..efc63fd 100644
--- a/aio.c
+++ b/aio.c
@@ -112,7 +112,7 @@  void qemu_aio_flush(void)
         LIST_FOREACH(node, &aio_handlers, node) {
             ret |= node->io_flush(node->opaque);
         }
-    } while (ret > 0);
+    } while (qemu_bh_poll() || ret > 0);
 }
 
 void qemu_aio_wait(void)