On 07/17/2017 07:19 AM, Kevin Wolf wrote: > While I think adding -u today is reasonably realistic, I'm doubtful that > we can get an introspection mechanism in place today. Perhaps we can > declare it a bug fix, but I'd rather not rush something like that. > > How does libvirt detect qemu-img features today? Just try and then check > the error message?
Yeah, when it comes to non-advertised feature detection, the best you can do is try using the feature, and fall back to the older approach if the feature was not present (this approach only works for features that gracefully fail without side effects when attempted on older versions, but fortunately that's the case for most true feature additions). And note that creating an image without a backing file, then using 'qemu-img rebase -u' to give it a backing image without probing the backing image, IS currently documented and supported (so we DO have a safe fallback, regardless of when 'qemu-img create -u ... size' actually lands). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature