On 06/06/2014 05:51 AM, Peter Krempa wrote: > On 06/06/14 00:52, Eric Blake wrote: >> Now that qemu 2.0 allows commit of the active layer, people are >> attempting to use virsh blockcommit and getting into a stuck >> state, because libvirt is unprepared to handle the two-phase >> commit required by qemu. >> >> This patch adds a flag to the libvirt API that a user MUST >> supply in order to acknowledge that they will be using two-phase >> semantics. It might be possible to have a mode where if the >> flag is omitted, we automatically do the case 2 semantics on >> the user's behalf; but before that happens, I must do additional >> patches to track the fact that we are doing an active commit >> in the domain XML. Later patches will add support of the flag, >> and once 2-phase semantics are working, we can then decide >> whether to relax things to allow an omitted flag to cause an >> automatic pivot. >> >> + /* XXX Should we auto-pivot when COMMIT_ACTIVE is not specified? */ > > I think we should do it in the future and possibly document the expected > behavior. > >> + if (!(flags & VIR_DOMAIN_BLOCK_COMMIT_ACTIVE)) { >> + virReportError(VIR_ERR_INVALID_ARG, >> + _("commit of '%s' active layer requires active flag"), >> + disk->dst); >> + goto endjob; >> + } >> } >> >> if (!topSource->backingStore) { > > ACK, adding the docs for the auto-pivot commit if you don't specify any > flag can be postponed. Agreed - we can document the new semantics once they are implemented. I've pushed this patch now to reserve the bit, even though I still need to post a v3 of the rest of the series with changes such as ensuring the persistent definition is updated appropriately. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list