From: Ján Tomko Date: Thu, 5 Jun 2014 16:47:21 +0000 (+0200) Subject: Fix storage format probing X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d76ada44405d2961c7067229baf28d0e14b0838b;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 (cherry picked from commit c110cdb2bcc9d29dafbc89d3edda16a824e9443d) Conflicts: src/storage/storage_backend_fs.c I didn't backport the refactors - febcb89 and effbb11 --- diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index 003c6df4b3..5099a1cb2f 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -100,6 +100,7 @@ virStorageBackendProbeTarget(virStorageSourcePtr target, if (VIR_STRDUP(*backingStore, meta->backingStoreRaw) < 0) goto error; + target->format = meta->format; } VIR_FORCE_CLOSE(fd); diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_backend_gluster.c index af6792fb14..c147c2da93 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;