qemu-block
[Top][All Lists]
Advanced

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

[Qemu-block] [PATCH v3 2/2] qemu: use bdrv_flush_all for vm_stop et al


From: John Snow
Subject: [Qemu-block] [PATCH v3 2/2] qemu: use bdrv_flush_all for vm_stop et al
Date: Thu, 15 Sep 2016 19:42:52 -0400

Bypass the usual check to see if we are "allowed" to flush via the
block model, and manually flush the BDS nodes themselves instead.

This allows us to do things like migrate when we have a device with
an open tray, but has a node that may need to be flushed.

Specifically, this allows us to migrate when we have a CDROM with
an open tray.

Signed-off-by: John Snow <address@hidden>
---
 cpus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpus.c b/cpus.c
index e39ccb7..96d9352 100644
--- a/cpus.c
+++ b/cpus.c
@@ -751,7 +751,7 @@ static int do_vm_stop(RunState state)
     }
 
     bdrv_drain_all();
-    ret = blk_flush_all();
+    ret = bdrv_flush_all();
 
     return ret;
 }
@@ -1494,7 +1494,7 @@ int vm_stop_force_state(RunState state)
         bdrv_drain_all();
         /* Make sure to return an error if the flush in a previous vm_stop()
          * failed. */
-        return blk_flush_all();
+        return bdrv_flush_all();
     }
 }
 
-- 
2.7.4




reply via email to

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