提交 d76ada44 编写于 作者: J Ján Tomko

Fix storage format probing

Commit fff74b27 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 c110cdb2)

Conflicts:
	src/storage/storage_backend_fs.c
      I didn't backport the refactors - febcb89c and effbb11e
上级 e604b59d
......@@ -100,6 +100,7 @@ virStorageBackendProbeTarget(virStorageSourcePtr target,
if (VIR_STRDUP(*backingStore, meta->backingStoreRaw) < 0)
goto error;
target->format = meta->format;
}
VIR_FORCE_CLOSE(fd);
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册