From d76ada44405d2961c7067229baf28d0e14b0838b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Thu, 5 Jun 2014 18:47:21 +0200 Subject: [PATCH] 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 --- src/storage/storage_backend_fs.c | 1 + src/storage/storage_backend_gluster.c | 1 + 2 files changed, 2 insertions(+) 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; -- GitLab