mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
qemu: Always assume support for QEMU_CAPS_INCREMENTAL_BACKUP
The support for incremental backup (not the backup api itself) was gated on support for migrating bitmaps. As the ability to migrate bitmaps was added in qemu-6.0 we can now assume that all supported qemu versions support incremental backup. Remove the interlocking. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
e6815547c8
commit
0b939c467a
@ -806,24 +806,6 @@ qemuBackupBegin(virDomainObj *vm,
|
||||
if (virDomainBackupAlignDisks(def, vm->def, suffix) < 0)
|
||||
goto endjob;
|
||||
|
||||
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
|
||||
size_t i;
|
||||
|
||||
if (chkdef) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("creating checkpoint for incremental backup is not supported yet"));
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
for (i = 0; i < def->ndisks; i++) {
|
||||
if (def->disks[i].backupmode == VIR_DOMAIN_BACKUP_DISK_BACKUP_MODE_INCREMENTAL) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("incremental backup is not supported yet"));
|
||||
goto endjob;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (priv->backup) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("another backup job is already running"));
|
||||
|
@ -6392,7 +6392,7 @@ static const struct virQEMUCapsDomainFeatureCapabilityTuple domCapsTuples[] = {
|
||||
{ VIR_DOMAIN_CAPS_FEATURE_VMCOREINFO, QEMU_CAPS_DEVICE_VMCOREINFO },
|
||||
{ VIR_DOMAIN_CAPS_FEATURE_GENID, QEMU_CAPS_DEVICE_VMGENID },
|
||||
{ VIR_DOMAIN_CAPS_FEATURE_BACKING_STORE_INPUT, QEMU_CAPS_LAST },
|
||||
{ VIR_DOMAIN_CAPS_FEATURE_BACKUP, QEMU_CAPS_INCREMENTAL_BACKUP },
|
||||
{ VIR_DOMAIN_CAPS_FEATURE_BACKUP, QEMU_CAPS_LAST },
|
||||
{ VIR_DOMAIN_CAPS_FEATURE_ASYNC_TEARDOWN, QEMU_CAPS_RUN_WITH_ASYNC_TEARDOWN },
|
||||
};
|
||||
|
||||
|
@ -588,12 +588,6 @@ qemuCheckpointCreateXML(virDomainPtr domain,
|
||||
_("cannot create checkpoint for inactive domain"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("incremental backup is not supported yet"));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(def = virDomainCheckpointDefParseString(xmlDesc, driver->xmlopt,
|
||||
@ -855,12 +849,6 @@ qemuCheckpointDelete(virDomainObj *vm,
|
||||
_("cannot delete checkpoint for inactive domain"));
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("incremental backup is not supported yet"));
|
||||
goto endjob;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(chk = qemuCheckpointObjFromCheckpoint(vm, checkpoint)))
|
||||
|
@ -10178,17 +10178,8 @@ qemuDomainDefHasManagedPR(virDomainObj *vm)
|
||||
* 0 in case everything is supported.
|
||||
*/
|
||||
int
|
||||
qemuDomainSupportsCheckpointsBlockjobs(virDomainObj *vm)
|
||||
qemuDomainSupportsCheckpointsBlockjobs(virDomainObj *vm G_GNUC_UNUSED)
|
||||
{
|
||||
qemuDomainObjPrivate *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;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user