提交 6227d980 编写于 作者: P Peter Krempa

qemu: domain: Base block job interlocking on QEMU_CAPS_INCREMENTAL_BACKUP

The QEMU_CAPS_INCREMENTAL_BACKUP will be enabled once all bits of the
incremental backup feature work as expected which means also properly
interacting with blockjobs and snapshots.

Thus we can allow blockjobs and snapshots if QEMU_CAPS_INCREMENTAL_BACKUP
is present even when checkpoints exist.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
上级 9dde58e1
......@@ -377,12 +377,6 @@ qemuCheckpointCreateXML(virDomainPtr domain,
update_current = false;
}
if (virDomainSnapshotObjListNum(vm->snapshots, NULL, 0) > 0) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot create checkpoint while snapshot exists"));
return NULL;
}
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("incremental backup is not supported yet"));
......
......@@ -15526,7 +15526,10 @@ qemuDomainDefHasManagedPR(virDomainObjPtr vm)
int
qemuDomainSupportsCheckpointsBlockjobs(virDomainObjPtr vm)
{
if (virDomainListCheckpoints(vm->checkpoints, NULL, NULL, NULL, 0) > 0) {
qemuDomainObjPrivatePtr priv = vm->privateData;
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP) &&
virDomainListCheckpoints(vm->checkpoints, NULL, NULL, NULL, 0) > 0) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot perform block operations while checkpoint exists"));
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册