Blame SOURCES/0030-migration-Reenable-incoming-live-block-migration.patch

383d26
From ed076b2838fb9c9b7e137352e72408d9267fd702 Mon Sep 17 00:00:00 2001
383d26
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
383d26
Date: Wed, 22 Nov 2017 15:41:32 +0100
383d26
Subject: migration: Reenable incoming live-block-migration
383d26
383d26
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
383d26
Message-id: <20171122154132.15363-1-dgilbert@redhat.com>
383d26
Patchwork-id: 77779
383d26
O-Subject: [RHEL-7.5 qemu-kvm-rhev PATCH 1/1] migration: Reenable incoming live-block-migration
383d26
Bugzilla: 1515173
383d26
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
383d26
RH-Acked-by: Fam Zheng <famz@redhat.com>
383d26
RH-Acked-by: Juan Quintela <quintela@redhat.com>
383d26
383d26
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
383d26
383d26
rhel7 has always disabled outgoing old-style live block migration
383d26
(but in -rhev enabled nbd block migration); however it allows
383d26
incoming old-style live block migration to allow reception of a stream
383d26
from rhel6.
383d26
383d26
I added --disable-live-block-migration to upstream in ed1701c6a5a,
383d26
however that really did disable it completely.
383d26
383d26
In the 7.5 world we've inherited the upstream version and lost the
383d26
incoming support.
383d26
383d26
Reenable incoming support even when outgoing is disabled.
383d26
383d26
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
383d26
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
383d26
(cherry picked from commit e6f62c7eb81f164ad5aef99a4f7ff48200928938)
383d26
(cherry picked from commit d5fb1ed0bc8fe06f7f9ffa50df033f1be6a19335)
383d26
(cherry picked from commit d4f3d9c5f333b1b97e0eea3eff665988d92f7a24)
383d26
(cherry picked from commit 011f4eb1ad9f4a3b358a904348340b010cf54512)
383d26
---
383d26
 include/migration/misc.h | 7 +++----
383d26
 migration/Makefile.objs  | 2 +-
383d26
 migration/block.h        | 6 +++++-
383d26
 3 files changed, 9 insertions(+), 6 deletions(-)
383d26
383d26
diff --git a/include/migration/misc.h b/include/migration/misc.h
383d26
index 4ebf24c..10084e0 100644
383d26
--- a/include/migration/misc.h
383d26
+++ b/include/migration/misc.h
383d26
@@ -22,11 +22,10 @@ void ram_mig_init(void);
383d26
 
383d26
 /* migration/block.c */
383d26
 
383d26
-#ifdef CONFIG_LIVE_BLOCK_MIGRATION
383d26
+/* RHEL7 allows incoming block migration even with
383d26
+ * --disable-live-block-migration to allow RHEL6->7 migration.
383d26
+ */
383d26
 void blk_mig_init(void);
383d26
-#else
383d26
-static inline void blk_mig_init(void) {}
383d26
-#endif
383d26
 
383d26
 #define SELF_ANNOUNCE_ROUNDS 5
383d26
 
383d26
diff --git a/migration/Makefile.objs b/migration/Makefile.objs
383d26
index c83ec47..5cb9fc0 100644
383d26
--- a/migration/Makefile.objs
383d26
+++ b/migration/Makefile.objs
383d26
@@ -10,6 +10,6 @@ common-obj-y += block-dirty-bitmap.o
383d26
 
383d26
 common-obj-$(CONFIG_RDMA) += rdma.o
383d26
 
383d26
-common-obj-$(CONFIG_LIVE_BLOCK_MIGRATION) += block.o
383d26
+common-obj-y += block.o
383d26
 
383d26
 rdma.o-libs := $(RDMA_LIBS)
383d26
diff --git a/migration/block.h b/migration/block.h
383d26
index 3178609..1cc81b0 100644
383d26
--- a/migration/block.h
383d26
+++ b/migration/block.h
383d26
@@ -14,7 +14,11 @@
383d26
 #ifndef MIGRATION_BLOCK_H
383d26
 #define MIGRATION_BLOCK_H
383d26
 
383d26
-#ifdef CONFIG_LIVE_BLOCK_MIGRATION
383d26
+/* RHEL7: live block migration is still compiled in even
383d26
+ * with --disable-live-block-migration since we must
383d26
+ * allow inbound migration from RHEL6.
383d26
+ */
383d26
+#if 1 /* CONFIG_LIVE_BLOCK_MIGRATION */
383d26
 int blk_mig_active(void);
383d26
 int blk_mig_bulk_active(void);
383d26
 uint64_t blk_mig_bytes_transferred(void);
383d26
-- 
383d26
1.8.3.1
383d26