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

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