On 10/21/2016 08:22 AM, Peter Krempa wrote:
>> static struct virQEMUCapsStringFlags
virQEMUCapsQMPSchemaQueries[] = {
>> - { "bogus/path/to/satisfy/compiler", 0 },
>> + { "blockdev-add/arg-type/options/+gluster/debug-level",
QEMU_CAPS_GLUSTER_DEBUG_LEVEL},
>
> Okay, I see how you plan to use this.
>
> BIG WARNING FLAG - in qemu 2.7, blockdev-add is unstable (it should have
> been named x-blockdev-add; but we goofed); but you can use the existence
> of x-blockdev-del as a witness that blockdev-add is incomplete.
>
> In qemu 2.8, we are taking advantage of the fact that 2.7 wasn't
> complete in order to get rid of the 'options' nesting layer; the plan is
> to also rename x-blockdev-add at the same time. Which means this probe,
> as written, will only succeed for 2.7.
So. Should I add both? One with the "options" indirection and one
without? Since there is no other way to access the structure than via
blockdev-add and I really don't want to add a version check I see it as
the only option.
Qemu 2.8 isn't released yet. We tend to only commit into libvirt
support for released qemu. So I think I'm okay with using this patch
as-is (it will detect support for 2.7); then a followup patch once 2.8
is actually released and we've tested that we can still detect the
capability with the new-and-improved blockdev-add and corresponding
second query addition at that time.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org