[qemu-xen master] migration: Recover block devices if failure in device state

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[qemu-xen master] migration: Recover block devices if failure in device state

patchbot
commit c8847f55656a26cef9a864689e75379410280d9b
Author:     Dr. David Alan Gilbert <[hidden email]>
AuthorDate: Mon Feb 5 09:13:37 2018 +0000
Commit:     Michael Roth <[hidden email]>
CommitDate: Sun Feb 11 21:05:39 2018 -0600

    migration: Recover block devices if failure in device state
   
    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 <[hidden email]>
    Reviewed-by: Peter Xu <[hidden email]>
    Signed-off-by: Dr. David Alan Gilbert <[hidden email]>
    (cherry picked from commit 6039dd5b1c45d76403b9dcadd2afd7efd8f42330)
    Signed-off-by: Michael Roth <[hidden email]>
---
 migration/migration.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/migration/migration.c b/migration/migration.c
index 4de3b55..d780601 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2128,7 +2128,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();
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#master

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog