]> Git Repo - qemu.git/commitdiff
migration: Recover block devices if failure in device state
authorDr. David Alan Gilbert <[email protected]>
Mon, 5 Feb 2018 09:13:37 +0000 (09:13 +0000)
committerDr. David Alan Gilbert <[email protected]>
Tue, 6 Feb 2018 14:53:02 +0000 (14:53 +0000)
In e91d895 I added the new pause-before-switchover mechanism
to allow migration completion to be delayed; this changes the
last state prior to completion to MIGRATE_STATUS_DEVICE rather
than MIGRATE_STATUS_ACTIVE.

Fix the failure path in migration_completion to recover the block
devices if it fails in MIGRATE_STATUS_DEVICE, not just the
MIGRATE_STATUS_ACTIVE that it previously had.

This corresponds to rh bz:
  https://bugzilla.redhat.com/show_bug.cgi?id=1538494
whose symptom is an occasional source crash on a failed migration.

Fixes: e91d8951d59d483f085f
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
migration/migration.c

index 44cbfb0ddd643b39fc65bfd3ae1ceae0975f93ad..0fdb2e410ddbb7da9adbef221ccf3899b1bc2841 100644 (file)
@@ -2122,7 +2122,8 @@ fail_invalidate:
     /* If not doing postcopy, vm_start() will be called: let's regain
      * control on images.
      */
-    if (s->state == MIGRATION_STATUS_ACTIVE) {
+    if (s->state == MIGRATION_STATUS_ACTIVE ||
+        s->state == MIGRATION_STATUS_DEVICE) {
         Error *local_err = NULL;
 
         qemu_mutex_lock_iothread();
This page took 0.030187 seconds and 4 git commands to generate.