[PATCH 7/8] qemuMigrationDstPrepareStorage: Move assumption that 'network' disks always exist

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

 



Move the assumption from the code pre-creating the storage to
qemuMigrationDstPrepareStorage where it's checked for other cases.

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

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 4c524fafe4..438aa4503e 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -338,10 +338,6 @@ qemuMigrationDstPrecreateDisk(virConnectPtr *conn,
         break;

     case VIR_STORAGE_TYPE_NETWORK:
-        VIR_DEBUG("Skipping creation of network disk '%s'",
-                  disk->dst);
-        return 0;
-
     case VIR_STORAGE_TYPE_BLOCK:
     case VIR_STORAGE_TYPE_DIR:
     case VIR_STORAGE_TYPE_NVME:
@@ -492,6 +488,12 @@ qemuMigrationDstPrepareStorage(virDomainObj *vm,
             exists = virFileExists(disk->src->vdpadev);
             break;

+        case VIR_STORAGE_TYPE_NETWORK:
+            /* For network disks we always assume they exist as the storage drivec
+             * can't create them */
+            exists = true;
+            break;
+
         case VIR_STORAGE_TYPE_VHOST_USER:
         case VIR_STORAGE_TYPE_DIR:
             virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
@@ -499,7 +501,6 @@ qemuMigrationDstPrepareStorage(virDomainObj *vm,
                            virStorageTypeToString(virStorageSourceGetActualType(disk->src)));
             return -1;

-        case VIR_STORAGE_TYPE_NETWORK:
         case VIR_STORAGE_TYPE_VOLUME:
         case VIR_STORAGE_TYPE_LAST:
         case VIR_STORAGE_TYPE_NONE:
-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[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