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@xxxxxxxxxx> --- src/qemu/qemu_backup.c | 18 ------------------ src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_checkpoint.c | 12 ------------ src/qemu/qemu_domain.c | 11 +---------- 4 files changed, 2 insertions(+), 41 deletions(-) diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index f64639d501..43576d135b 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -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")); diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 615efbf021..117648f03f 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -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 }, }; diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c index b05aaa246e..cf44e45aa1 100644 --- a/src/qemu/qemu_checkpoint.c +++ b/src/qemu/qemu_checkpoint.c @@ -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))) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 8be2181156..ea29765c61 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -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; } -- 2.48.1