]> xenbits.xensource.com Git - libvirt.git/commit
util: storagefile: Add handling of unusable storage sources
authorPeter Krempa <pkrempa@redhat.com>
Fri, 16 Aug 2019 09:14:31 +0000 (11:14 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 26 Aug 2019 11:49:17 +0000 (13:49 +0200)
commit9467c37e963f9a68db0b6a32ccb331fbdc2664ae
tree2470cbb17bb4d61eec9a3bbf0c507235c091e262
parente1189ae5f320cfe8c87588ffd15ca02840391918
util: storagefile: Add handling of unusable storage sources

Introduce new semantics to virStorageSourceNewFromBacking and some
of the helpers used by it which propagate the return value from the
callers.

The new return value introduced by this patch allows to notify the
calller that the parsed virStorageSource correctly describes the source
but contains data such as inline authentication which libvirt does not
want to support directly. This means that such file would e.g. unusable
as a storage source (e.g. when actively commiting the overlay to it) or
would not work with blockdev.

The caller will then be able to decide whether to consider this backing
file as viable or just fall back to qemu dealing with it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virstoragefile.c