]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration: Call blk_resume_after_migration() for postcopy
authorKevin Wolf <kwolf@redhat.com>
Thu, 13 Apr 2017 16:38:28 +0000 (18:38 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 27 Apr 2017 13:39:49 +0000 (15:39 +0200)
Commit d35ff5e6 ('block: Ignore guest dev permissions during incoming
migration') added blk_resume_after_migration() to the precopy migration
path, but neglected to add it to the duplicated code that is used for
postcopy migration. This means that the guest device doesn't request the
necessary permissions, which ultimately led to failing assertions.

Add the missing blk_resume_after_migration() to the postcopy path.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
migration/savevm.c

index 03ae1bdeb4c9c587ff399d4f5513a7216bea7171..a00c1ab0afdbdec2aafd3f4261d1593ffde400c6 100644 (file)
@@ -1622,6 +1622,14 @@ static void loadvm_postcopy_handle_run_bh(void *opaque)
         error_report_err(local_err);
     }
 
+    /* If we get an error here, just don't restart the VM yet. */
+    blk_resume_after_migration(&local_err);
+    if (local_err) {
+        error_free(local_err);
+        local_err = NULL;
+        autostart = false;
+    }
+
     trace_loadvm_postcopy_handle_run_cpu_sync();
     cpu_synchronize_all_post_init();