提交 7456c4f5 编写于 作者: P Peter Krempa

qemu: snapshot: Don't redetect backing chain after snapshot

Libvirt is able to properly model what happens to the backing chain
after a snapshot so there's no real need to redetect the data.
Additionally with the _REUSE_EXT flag this might end up in redetecting
wrong data if the user puts wrong backing chain reference into the
snapshot image.
上级 a05e2570
......@@ -14359,7 +14359,6 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
bool persist = false;
bool reuse = (flags & VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT) != 0;
virQEMUDriverConfigPtr cfg = NULL;
virErrorPtr orig_err = NULL;
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID,
......@@ -14444,19 +14443,6 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
}
}
/* recheck backing chains of all disks involved in the snapshot */
orig_err = virSaveLastError();
for (i = 0; i < snap->def->ndisks; i++) {
if (snap->def->disks[i].snapshot != VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL)
continue;
ignore_value(qemuDomainDetermineDiskChain(driver, vm, vm->def->disks[i],
true, true));
}
if (orig_err) {
virSetError(orig_err);
virFreeError(orig_err);
}
if (ret == 0 || !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_TRANSACTION)) {
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0 ||
(persist && virDomainSaveConfig(cfg->configDir, driver->caps,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册