]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: don't probe non-files
authorEric Blake <eblake@redhat.com>
Tue, 9 Oct 2012 23:50:14 +0000 (17:50 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 19 Oct 2012 23:35:10 +0000 (17:35 -0600)
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

index 1e48a51984fa668a73e6130bdb32e0c29f45e851..db19b879700831595ac2ad96e7b681092107b227 100644 (file)
@@ -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