From: Ján Tomko Date: Thu, 5 Jun 2014 16:47:21 +0000 (+0200) Subject: Fix storage format probing X-Git-Tag: v1.2.6-rc1~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c110cdb2bcc9d29dafbc89d3edda16a824e9443d;p=thirdparty%2Flibvirt.git Fix storage format probing Commit fff74b2 moved the probing into virStorageFileGetMetadataFromBuf but didn't update the format in volume definition. https://bugzilla.redhat.com/show_bug.cgi?id=1104908 --- diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index 133e059f88..c93fc1e122 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -104,6 +104,8 @@ virStorageBackendProbeTarget(virStorageSourcePtr target, /* Default to success below this point */ ret = 0; + target->format = meta->format; + if (*backingStore && *backingStoreFormat == VIR_STORAGE_FILE_AUTO && virStorageIsFile(*backingStore)) { diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_backend_gluster.c index 3db4e66729..b96d1167ed 100644 --- a/src/storage/storage_backend_gluster.c +++ b/src/storage/storage_backend_gluster.c @@ -298,6 +298,7 @@ virStorageBackendGlusterRefreshVol(virStorageBackendGlusterStatePtr state, &vol->backingStore.format))) goto cleanup; + vol->target.format = meta->format; if (vol->backingStore.path && vol->backingStore.format < 0) vol->backingStore.format = VIR_STORAGE_FILE_RAW;