]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix storage format probing
authorJán Tomko <jtomko@redhat.com>
Thu, 5 Jun 2014 16:47:21 +0000 (18:47 +0200)
committerJán Tomko <jtomko@redhat.com>
Fri, 6 Jun 2014 07:21:27 +0000 (09:21 +0200)
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

src/storage/storage_backend_fs.c
src/storage/storage_backend_gluster.c

index 003c6df4b38e78221e45ba9a1dccb476391dc4fd..5099a1cb2ff301a8e64c63c9b1d88f2e27607fe6 100644 (file)
@@ -100,6 +100,7 @@ virStorageBackendProbeTarget(virStorageSourcePtr target,
 
         if (VIR_STRDUP(*backingStore, meta->backingStoreRaw) < 0)
             goto error;
+        target->format = meta->format;
     }
 
     VIR_FORCE_CLOSE(fd);
index af6792fb1465505b55a47bdef1c73fbfa817ff1c..c147c2da932a2dc04e52c2861886c37fdaef32b9 100644 (file)
@@ -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;