[PATCH 29/31] qemu: migration: Use 'format' nodename accessors in dirty bitmap migration

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

 



The persistent bitmaps are stored in the format layer, using 'effective'
bitmap name is the most reasonable approach in this case.

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

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 949ef6d6d5..76da981d08 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2393,7 +2393,8 @@ qemuMigrationSrcBeginPhaseBlockDirtyBitmaps(qemuMigrationCookie *mig,
         qemuMigrationBlockDirtyBitmapsDisk *disk;
         GSList *bitmaps = NULL;
         virDomainDiskDef *diskdef = vm->def->disks[i];
-        qemuBlockNamedNodeData *nodedata = virHashLookup(blockNamedNodeData, diskdef->src->nodeformat);
+        qemuBlockNamedNodeData *nodedata = virHashLookup(blockNamedNodeData,
+                                                         qemuBlockStorageSourceGetEffectiveNodename(diskdef->src));
         size_t j;

         if (!nodedata)
@@ -4456,7 +4457,7 @@ qemuMigrationSrcRunPrepareBlockDirtyBitmapsMerge(virDomainObj *vm,
                     granularity = b->granularity;

                 if (qemuMonitorTransactionBitmapMergeSourceAddBitmap(merge,
-                                                                     n->nodeformat,
+                                                                     qemuBlockStorageSourceGetEffectiveNodename(n),
                                                                      b->name) < 0)
                     return -1;
             }
@@ -4465,19 +4466,19 @@ qemuMigrationSrcRunPrepareBlockDirtyBitmapsMerge(virDomainObj *vm,
             bitmap->persistent = VIR_TRISTATE_BOOL_YES;

             if (qemuMonitorTransactionBitmapAdd(actions,
-                                                disk->disk->src->nodeformat,
+                                                qemuBlockStorageSourceGetEffectiveNodename(disk->disk->src),
                                                 bitmap->sourcebitmap,
                                                 false, false, granularity) < 0)
                 return -1;

             if (qemuMonitorTransactionBitmapMerge(actions,
-                                                  disk->disk->src->nodeformat,
+                                                  qemuBlockStorageSourceGetEffectiveNodename(disk->disk->src),
                                                   bitmap->sourcebitmap,
                                                   &merge) < 0)
                 return -1;

             tmpbmp = g_new0(qemuDomainJobPrivateMigrateTempBitmap, 1);
-            tmpbmp->nodename = g_strdup(disk->disk->src->nodeformat);
+            tmpbmp->nodename = g_strdup(qemuBlockStorageSourceGetEffectiveNodename(disk->disk->src));
             tmpbmp->bitmapname = g_strdup(bitmap->sourcebitmap);
             tmpbitmaps = g_slist_prepend(tmpbitmaps, tmpbmp);
         }
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index ba146960d5..5505fdaf22 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -1573,7 +1573,7 @@ qemuMigrationCookieBlockDirtyBitmapsMatchDisks(virDomainDef *def,
             return -1;
         }

-        disk->nodename = disk->disk->src->nodeformat;
+        disk->nodename = qemuBlockStorageSourceGetEffectiveNodename(disk->disk->src);
     }

     return 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