On Thu 18 Jun 2015 01:47:20 PM CEST, Kevin Wolf wrote:

>> > I believe our conclusion from an earlier version of the series was
>> > that we need QAPI introspection so that libvirt can detect the
>> > presence of the feature.
>> 
>> The initial version of this series had an extra 'top' parameter to
>> decide what image to stream data into. [...] That was later removed
>> when we agreed that we could just reuse the 'device' parameter to
>> refer to either a device or a node name.
>> 
>> I don't think that introspection support would make a difference in
>> this case, or am I missing anything?
>
> Hm, yes, probably not. But how would libvirt detect the feature then?

One possibility is to try to stream to an intermediate node and see if
it fails.

Example: in a chain like [A] <- [B] <- [C], streaming to [B] using [A]
as the 'base' parameter is a no-op (there's even a test for that in
iotest 030).

If QEMU does support streaming to [B], the operation will succeed but do
nothing. Otherwise the operation will fail with a DeviceNotFound error.

That said, I would prefer a way to detect the feature that does not
involve testing commands for their error codes, but is there any? What
does libvirt generally do in order to detect new features that don't
depend on API changes?

Berto

Reply via email to