[PATCH 07/13] qemuMigrationSrcBeginPhaseBlockDirtyBitmaps: Use qemuMigrationAnyCopyDisk()

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

 



The function open-coded the checking whether a disk is being migrated
with non-shared storage and did so badly (not taking into account if
user doesn't explicitly provide list of disks to migrate).

Use the existing helper instead.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_migration.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index b686e42e58..a2c5be3e82 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2466,19 +2466,8 @@ qemuMigrationSrcBeginPhaseBlockDirtyBitmaps(qemuMigrationCookie *mig,
         if (!nodedata)
             continue;

-        if (migrate_disks) {
-            bool migrating = false;
-
-            for (j = 0; j < nmigrate_disks; j++) {
-                if (STREQ(migrate_disks[j], diskdef->dst)) {
-                    migrating = true;
-                    break;
-                }
-            }
-
-            if (!migrating)
-                continue;
-        }
+        if (!qemuMigrationAnyCopyDisk(diskdef, nmigrate_disks, migrate_disks))
+            continue;

         for (j = 0; j < nodedata->nbitmaps; j++) {
             qemuMigrationBlockDirtyBitmapsDiskBitmap *bitmap;
-- 
2.46.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