Blame SOURCES/kvm-migration-Recover-block-devices-if-failure-in-device.patch

9bac43
From 2b263ba2282ac34afa1f9fd1892db868d8b91dba Mon Sep 17 00:00:00 2001
9bac43
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
9bac43
Date: Wed, 7 Feb 2018 12:24:49 +0100
9bac43
Subject: [PATCH 01/15] migration: Recover block devices if failure in device
9bac43
 state
9bac43
9bac43
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
9bac43
Message-id: <20180207122449.11675-2-dgilbert@redhat.com>
9bac43
Patchwork-id: 78915
9bac43
O-Subject: [RHEL-7.5 qemu-kvm-rhev PATCH 1/1] migration: Recover block devices if failure in device state
9bac43
Bugzilla: 1538494
9bac43
RH-Acked-by: Peter Xu <peterx@redhat.com>
9bac43
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
9bac43
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
9bac43
9bac43
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
9bac43
9bac43
In e91d895 I added the new pause-before-switchover mechanism
9bac43
to allow migration completion to be delayed; this changes the
9bac43
last state prior to completion to MIGRATE_STATUS_DEVICE rather
9bac43
than MIGRATE_STATUS_ACTIVE.
9bac43
9bac43
Fix the failure path in migration_completion to recover the block
9bac43
devices if it fails in MIGRATE_STATUS_DEVICE, not just the
9bac43
MIGRATE_STATUS_ACTIVE that it previously had.
9bac43
9bac43
This corresponds to rh bz:
9bac43
  https://bugzilla.redhat.com/show_bug.cgi?id=1538494
9bac43
whose symptom is an occasional source crash on a failed migration.
9bac43
9bac43
Fixes: e91d8951d59d483f085f
9bac43
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
9bac43
Reviewed-by: Peter Xu <peterx@redhat.com>
9bac43
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
9bac43
(cherry picked from commit 6039dd5b1c45d76403b9dcadd2afd7efd8f42330)
9bac43
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9bac43
---
9bac43
 migration/migration.c | 3 ++-
9bac43
 1 file changed, 2 insertions(+), 1 deletion(-)
9bac43
9bac43
diff --git a/migration/migration.c b/migration/migration.c
9bac43
index cd33718..38d4d9f 100644
9bac43
--- a/migration/migration.c
9bac43
+++ b/migration/migration.c
9bac43
@@ -1990,7 +1990,8 @@ fail_invalidate:
9bac43
     /* If not doing postcopy, vm_start() will be called: let's regain
9bac43
      * control on images.
9bac43
      */
9bac43
-    if (s->state == MIGRATION_STATUS_ACTIVE) {
9bac43
+    if (s->state == MIGRATION_STATUS_ACTIVE ||
9bac43
+        s->state == MIGRATION_STATUS_DEVICE) {
9bac43
         Error *local_err = NULL;
9bac43
 
9bac43
         qemu_mutex_lock_iothread();
9bac43
-- 
9bac43
1.8.3.1
9bac43