1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-04-01 20:05:19 +00:00

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
This commit is contained in:
Ján Tomko 2014-06-05 18:47:21 +02:00
parent e604b59d79
commit d76ada4440
2 changed files with 2 additions and 0 deletions

View 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);

View 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;