[libvirt] [PATCH 2/5] conf: expose probe for non-local storage
Peter Krempa
pkrempa at redhat.com
Thu Apr 10 10:00:22 UTC 2014
On 04/10/14 05:41, Eric Blake wrote:
> Deciding if a user string represents a local file instead of a
> network path is an operation worth exposing directly, particularly
> since the next patch will be removing a redundant variable that
> was caching the information.
>
> * src/util/virstoragefile.h (virStorageIsFile): New declaration.
> * src/util/virstoragefile.c (virBackingStoreIsFile): Rename...
> (virStorageIsFile): ...export, and allow NULL input.
> (virStorageFileGetMetadataInternal)
> (virStorageFileGetMetadataRecurse, virStorageFileGetMetadata):
> Update callers.
> * src/conf/domain_conf.c (virDomainDiskDefForeachPath): Use it.
> * src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):
> Likewise.
> * src/libvirt_private.syms (virstoragefile.h): Export function.
>
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
> src/conf/domain_conf.c | 2 +-
> src/libvirt_private.syms | 1 +
> src/storage/storage_backend_fs.c | 2 +-
> src/util/virstoragefile.c | 20 +++++++++++++-------
> src/util/virstoragefile.h | 1 +
> 5 files changed, 17 insertions(+), 9 deletions(-)
>
ACK, although we should switch to determining whether the file is local
by inspecting other metadata than the backing string in the future.
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140410/af66d425/attachment-0001.sig>
More information about the libvir-list
mailing list