[libvirt] [PATCH v4 3/5] blockjob: expose active commit capability

Eric Blake eblake at redhat.com
Thu Jul 3 20:35:07 UTC 2014


On 06/24/2014 02:06 AM, Peter Krempa wrote:
> On 06/24/14 01:30, Eric Blake wrote:
>> Add an element to QEMU's capability XML, to show if the underlying
>> qemu binary supports active commit.  This allows the client to know
>> ahead of time if they can rely on this method, or must fall back
>> to older techniques such as blockpull.  Without this information,
>> the only way to check for active commit is to attempt one and check
>> for errors.
>>
>> This attribute can be a simple binary (active commit is supported
>> only if <activecommit/> is in the capabilities) rather than a
>> full-blown toggle definition.  (In contrast, the <disksnapshot>
>> capability had to be a toggle because we forgot to add it at the
>> same time as turning on the feature of external snapshots; and
>> therefore, the absence of the attribute is not sufficient to
>> conclude whether disk snapshots are supported.)
>>
>> Our documentation for features was rather sparse; this fleshes out
>> more of the details for other existing capabilities (and cost me
>> some time trawling git history).

I'm going to split this patch. The documentation for the pre-existing bits,


>> +    if (!virCapabilitiesAddGuestFeature(guest, "activecommit",
>> +                                        virQEMUCapsGet(qemubinCaps,
>> +                                                       QEMU_CAPS_ACTIVE_COMMIT),
>> +                                        0))
> 
> Yuck, integers for boolean values. Pre-existing though.

and a cleanup of int-to-bool, is worth having, but now that we have
virConnectGetDomainCapabilities, I'd rather expose this new capability
through that API than by overloading another feature into this code.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140703/e05f37b4/attachment-0001.sig>


More information about the libvir-list mailing list