mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
qemu: migration_cookie: Remove pre-blockdev code paths
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d5857ea611
commit
1d53e96aad
@ -478,7 +478,6 @@ qemuMigrationCookieAddNBD(qemuMigrationCookie *mig,
|
||||
{
|
||||
qemuDomainObjPrivate *priv = vm->privateData;
|
||||
g_autoptr(GHashTable) stats = virHashNew(g_free);
|
||||
bool blockdev = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV);
|
||||
size_t i;
|
||||
int rc;
|
||||
|
||||
@ -498,11 +497,11 @@ qemuMigrationCookieAddNBD(qemuMigrationCookie *mig,
|
||||
|
||||
if (qemuDomainObjEnterMonitorAsync(vm, priv->job.asyncJob) < 0)
|
||||
return -1;
|
||||
if (blockdev)
|
||||
rc = qemuMonitorBlockStatsUpdateCapacityBlockdev(priv->mon, stats);
|
||||
else
|
||||
rc = qemuMonitorBlockStatsUpdateCapacity(priv->mon, stats);
|
||||
|
||||
rc = qemuMonitorBlockStatsUpdateCapacityBlockdev(priv->mon, stats);
|
||||
|
||||
qemuDomainObjExitMonitor(vm);
|
||||
|
||||
if (rc < 0)
|
||||
return -1;
|
||||
|
||||
@ -510,14 +509,8 @@ qemuMigrationCookieAddNBD(qemuMigrationCookie *mig,
|
||||
virDomainDiskDef *disk = vm->def->disks[i];
|
||||
qemuBlockStats *entry;
|
||||
|
||||
if (blockdev) {
|
||||
if (!(entry = virHashLookup(stats, disk->src->nodeformat)))
|
||||
continue;
|
||||
} else {
|
||||
if (!disk->info.alias ||
|
||||
!(entry = virHashLookup(stats, disk->info.alias)))
|
||||
continue;
|
||||
}
|
||||
if (!(entry = virHashLookup(stats, disk->src->nodeformat)))
|
||||
continue;
|
||||
|
||||
mig->nbd->disks[mig->nbd->ndisks].target = g_strdup(disk->dst);
|
||||
mig->nbd->disks[mig->nbd->ndisks].capacity = entry->capacity;
|
||||
|
Loading…
Reference in New Issue
Block a user