File c110cdb2-fix-format-probe.patch of Package libvirt.11695

commit c110cdb2bcc9d29dafbc89d3edda16a824e9443d
Author: Ján Tomko <jtomko@redhat.com>
Date:   Thu Jun 5 18:47:21 2014 +0200

    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

Index: libvirt-1.2.5/src/storage/storage_backend_fs.c
===================================================================
--- libvirt-1.2.5.orig/src/storage/storage_backend_fs.c
+++ libvirt-1.2.5/src/storage/storage_backend_fs.c
@@ -100,6 +100,8 @@ virStorageBackendProbeTarget(virStorageS
 
         if (VIR_STRDUP(*backingStore, meta->backingStoreRaw) < 0)
             goto error;
+
+        target->format = meta->format;
     }
 
     VIR_FORCE_CLOSE(fd);
Index: libvirt-1.2.5/src/storage/storage_backend_gluster.c
===================================================================
--- libvirt-1.2.5.orig/src/storage/storage_backend_gluster.c
+++ libvirt-1.2.5/src/storage/storage_backend_gluster.c
@@ -298,6 +298,7 @@ virStorageBackendGlusterRefreshVol(virSt
                                                   &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;