[libvirt] [PATCHv2 07/16] storage: don't probe non-files

Doug Goldstein cardoe at gentoo.org
Mon Oct 15 04:40:07 UTC 2012


On Sat, Oct 13, 2012 at 5:00 PM, Eric Blake <eblake at redhat.com> wrote:
> Backing chains can end on a network protocol, such as nbd:xxx; we
> should not attempt to probe the file system in this case.
>
> * src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):
> Only probe files.
> ---
>  src/storage/storage_backend_fs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
> index 1e48a51..db19b87 100644
> --- a/src/storage/storage_backend_fs.c
> +++ b/src/storage/storage_backend_fs.c
> @@ -108,7 +108,8 @@ virStorageBackendProbeTarget(virStorageVolTargetPtr target,
>      if (meta->backingStore) {
>          *backingStore = meta->backingStore;
>          meta->backingStore = NULL;
> -        if (meta->backingStoreFormat == VIR_STORAGE_FILE_AUTO) {
> +        if (meta->backingStoreFormat == VIR_STORAGE_FILE_AUTO &&
> +            meta->backingStoreIsFile) {
>              if ((ret = virStorageFileProbeFormat(*backingStore)) < 0) {
>                  /* If the backing file is currently unavailable, only log an error,
>                   * but continue. Returning -1 here would disable the whole storage
> --

Makes sense. ACK.

-- 
Doug Goldstein




More information about the libvir-list mailing list