[PATCH 02/22] qemu: migration: No longer avoid 'auto-read-only' option for migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The 'auto-read-only' blockdev option is available in all supported qemu
versions so we can remove the migration hack which disabled it.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_block.c     | 8 ++------
 src/qemu/qemu_block.h     | 3 +--
 src/qemu/qemu_command.c   | 2 +-
 src/qemu/qemu_migration.c | 5 +----
 4 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 0d252552de..e706bb7369 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -1513,14 +1513,10 @@ qemuBlockStorageSourceAttachDataFree(qemuBlockStorageSourceAttachData *data)
  */
 qemuBlockStorageSourceAttachData *
 qemuBlockStorageSourceAttachPrepareBlockdev(virStorageSource *src,
-                                            virStorageSource *backingStore,
-                                            bool autoreadonly)
+                                            virStorageSource *backingStore)
 {
     g_autoptr(qemuBlockStorageSourceAttachData) data = NULL;
-    unsigned int backendpropsflags = 0;
-
-    if (autoreadonly)
-        backendpropsflags |= QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY;
+    unsigned int backendpropsflags = QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY;

     data = g_new0(qemuBlockStorageSourceAttachData, 1);

diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h
index 7008a4e7da..7bb83d8d44 100644
--- a/src/qemu/qemu_block.h
+++ b/src/qemu/qemu_block.h
@@ -134,8 +134,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuBlockStorageSourceAttachData,

 qemuBlockStorageSourceAttachData *
 qemuBlockStorageSourceAttachPrepareBlockdev(virStorageSource *src,
-                                            virStorageSource *backingStore,
-                                            bool autoreadonly);
+                                            virStorageSource *backingStore);

 qemuBlockStorageSourceAttachData *
 qemuBlockStorageSourceDetachPrepare(virStorageSource *src);
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index d40d3a4e13..ba21976956 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -10937,7 +10937,7 @@ qemuBuildStorageSourceChainAttachPrepareBlockdevOne(qemuBlockStorageSourceChainD
 {
     g_autoptr(qemuBlockStorageSourceAttachData) elem = NULL;

-    if (!(elem = qemuBlockStorageSourceAttachPrepareBlockdev(src, backingStore, true)))
+    if (!(elem = qemuBlockStorageSourceAttachPrepareBlockdev(src, backingStore)))
         return -1;

     if (qemuBuildStorageSourceAttachPrepareCommon(src, elem) < 0)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 76da981d08..ac58aa1a8c 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1045,11 +1045,8 @@ qemuMigrationSrcNBDStorageCopyBlockdev(virDomainObj *vm,
                                                                         tlsAlias, tlsHostname)))
         return -1;

-    /* Migration via blockdev-mirror was supported sooner than the auto-read-only
-     * feature was added to qemu */
     if (!(data = qemuBlockStorageSourceAttachPrepareBlockdev(copysrc,
-                                                             copysrc->backingStore,
-                                                             false)))
+                                                             copysrc->backingStore)))
         return -1;

     if (qemuDomainObjEnterMonitorAsync(vm, VIR_ASYNC_JOB_MIGRATION_OUT) < 0)
-- 
2.41.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux