From: Eric Blake Date: Tue, 9 Oct 2012 23:50:14 +0000 (-0600) Subject: storage: don't probe non-files X-Git-Tag: v1.0.0-rc1~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eac74c1f4752d7311def4b2e4848f5fd218e515c;p=thirdparty%2Flibvirt.git storage: don't probe non-files 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. --- diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index 1e48a51984..db19b87970 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