mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-04 21:47:16 +03:00
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: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
9dde58e1c3
commit
6227d9806f
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user