On 06/06/14 00:52, Eric Blake wrote: > With this in place, I can (finally!) now do: > > virsh blockcommit $dom vda --shallow --wait --verbose --pivot > > and watch qemu shorten the backing chain by one, followed by > libvirt automatically updating the dumpxml output, effectively > undoing the work of virsh snapshot-commit --no-metadata --disk-only. > Commit is SOOOO much faster than blockpull, when I'm still fairly > close in time to when the temporary qcow2 wrapper file was created > via a snapshot operation! > > * src/qemu/qemu_driver.c (qemuDomainBlockCommit): Implement live > commit to regular files. > > Signed-off-by: Eric Blake <eblake@xxxxxxxxxx> > --- > src/qemu/qemu_driver.c | 45 +++++++++++++++++++++++++++++++++++++++------ > 1 file changed, 39 insertions(+), 6 deletions(-) > > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c > index 5903144..c0fc5e9 100644 > --- a/src/qemu/qemu_driver.c > +++ b/src/qemu/qemu_driver.c > @@ -15540,13 +15542,14 @@ qemuDomainBlockCommit(virDomainPtr dom, > &top_parent))) > goto endjob; > > - /* FIXME: qemu 2.0 supports active commit, but as a two-stage > - * process; qemu 2.1 is further improving active commit. We need > - * to start supporting it in libvirt. */ > if (topSource == disk->src) { > /* We assume that no one will backport qemu 2.0 active commit > * to an earlier qemu without also backporting the block job > - * ready event; but this makes sure of that fact */ > + * ready event; but this makes sure of that fact. > + * > + * XXX Also need to check other capability bit(s): qemu 1.7 > + * supports async blockjob but not active commit; and qemu 2.0 > + * active commit misbehaves on 0-byte file. */ > if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKJOB_ASYNC)) { > virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > _("active commit not supported with this QEMU binary")); ACK once you figure out the detection of the capability. Peter
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list