On Thu 18 Jun 2015 02:36:13 PM CEST, Eric Blake wrote: [Detecting support for intermediate block streaming] >> 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.
> In general, if a feature addition doesn't change API, but merely > converts what was previously an error into something that works, then > libvirt is probably okay with just trying the feature, and reporting > the error message if it fails (assuming the qemu error message is > sane). With the example I gave above you should be able to detect easily if the feature is present, but from what you say I understand that strictly speaking you wouldn't even need to do that. If you try to stream to a node and QEMU does not support that you will get a 'device not found' error, which is I guess the kind of error that you would expect. Since the only thing that changes with this feature is the 'device' parameter I don't think there's any room for ambiguity. Berto