qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] migration: invalidate cache before source start
@ 2018-06-09 14:14 Vladimir Sementsov-Ogievskiy
  2018-06-15 12:06 ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 12+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2018-06-09 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, quintela

Invalidate cache before source start in case of failed migration.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---

 migration/migration.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/migration/migration.c b/migration/migration.c
index 1e99ec9b7e..8f39e0dc02 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2806,7 +2806,14 @@ static void migration_iteration_finish(MigrationState *s)
     case MIGRATION_STATUS_FAILED:
     case MIGRATION_STATUS_CANCELLED:
         if (s->vm_was_running) {
-            vm_start();
+            Error *local_err = NULL;
+            bdrv_invalidate_cache_all(&local_err);
+            if (local_err) {
+                error_reportf_err(local_err, "Can't invalidate disks before "
+                                  "source vm start");
+            } else {
+                vm_start();
+            }
         } else {
             if (runstate_check(RUN_STATE_FINISH_MIGRATE)) {
                 runstate_set(RUN_STATE_POSTMIGRATE);
-- 
2.11.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-10-08 20:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-09 14:14 [Qemu-devel] [PATCH] migration: invalidate cache before source start Vladimir Sementsov-Ogievskiy
2018-06-15 12:06 ` Dr. David Alan Gilbert
2018-06-15 12:33   ` Vladimir Sementsov-Ogievskiy
2018-06-22 20:54     ` John Snow
2018-06-25 17:14     ` Dr. David Alan Gilbert
2018-06-25 17:50       ` Dr. David Alan Gilbert
2018-06-25 18:03         ` John Snow
2018-06-26  7:31           ` Vladimir Sementsov-Ogievskiy
2018-06-26 19:11             ` Dr. David Alan Gilbert
2018-06-26  8:44         ` Vladimir Sementsov-Ogievskiy
2018-10-08 15:36           ` Vladimir Sementsov-Ogievskiy
2018-10-08 20:21             ` John Snow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).