[PATCH 3/3] Fix storage format probing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
---
 src/storage/storage_backend_fs.c      | 2 ++
 src/storage/storage_backend_gluster.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index 133e059..c93fc1e 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 3db4e66..b96d116 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;
-- 
1.8.3.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]