提交 c885b7fe 编写于 作者: P Peter Krempa

qemu: block commit: Don't overwrite error when rolling back disk labels

Calls to qemuDomainDiskChainElementPrepare resets the original error,
thus we need to save it in the cleanup path of qemuDomainBlockCommit.
上级 3488f449
......@@ -17270,10 +17270,16 @@ qemuDomainBlockCommit(virDomainPtr dom,
endjob:
if (ret < 0 && clean_access) {
virErrorPtr orig_err = virSaveLastError();
/* Revert access to read-only, if possible. */
qemuDomainDiskChainElementPrepare(driver, vm, baseSource, true);
if (top_parent && top_parent != disk->src)
qemuDomainDiskChainElementPrepare(driver, vm, top_parent, true);
if (orig_err) {
virSetError(orig_err);
virFreeError(orig_err);
}
}
virStorageSourceFree(mirror);
qemuDomainObjEndJob(driver, vm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册