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@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
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;