On Tue, Dec 10, 2019 at 17:25:41 +0100, Pavel Mores wrote: > With all plumbing in place, we can now enable the new functionality. > > Signed-off-by: Pavel Mores <pmores@xxxxxxxxxx> > --- > src/qemu/qemu_driver.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c > index 9c07b6b393..0cbc746c22 100644 > --- a/src/qemu/qemu_driver.c > +++ b/src/qemu/qemu_driver.c > @@ -18544,10 +18544,10 @@ qemuDomainBlockCommit(virDomainPtr dom, > bool persistjob = false; > bool blockdev = false; > > - /* XXX Add support for COMMIT_DELETE */ > virCheckFlags(VIR_DOMAIN_BLOCK_COMMIT_SHALLOW | > VIR_DOMAIN_BLOCK_COMMIT_ACTIVE | > VIR_DOMAIN_BLOCK_COMMIT_RELATIVE | > + VIR_DOMAIN_BLOCK_COMMIT_DELETE | > VIR_DOMAIN_BLOCK_COMMIT_BANDWIDTH_BYTES, -1); > > if (!(vm = qemuDomainObjFromDomain(dom))) > @@ -18568,6 +18568,13 @@ qemuDomainBlockCommit(virDomainPtr dom, > > blockdev = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV); > > + if (!blockdev && (flags & VIR_DOMAIN_BLOCK_COMMIT_DELETE)) { > + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, > + _("deleting committed images is only supported for VMs " > + "with blockdev enabled")); > + goto endjob; > + } make[1]: Leaving directory '/home/pipo/build/libvirt/gcc/src' /home/pipo/libvirt/src/qemu/qemu_driver.c:18572: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, /home/pipo/libvirt/src/qemu/qemu_driver.c-18573- _("deleting committed images is only supported for VMs " /home/pipo/libvirt/src/qemu/qemu_driver.c-18574- "with blockdev enabled")); build-aux/syntax-check.mk: found diagnostic without % make: *** [/home/pipo/libvirt/build-aux/syntax-check.mk:756: sc_prohibit_diagnostic_without_format] Error 1 Please make sure you run 'make syntax-check' before submitting patches. I'll fix this before pushing with with: if (!blockdev && (flags & VIR_DOMAIN_BLOCK_COMMIT_DELETE)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", _("deleting committed images is not supported by this VM")); goto endjob; } Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx> -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list