[libvirt] [PATCH v2 2/4] qemu: command: Use 'actualType' when deciding whether to use disk format

Peter Krempa pkrempa at redhat.com
Tue Jun 25 14:30:31 UTC 2019


qemuBuildDriveSourceStr omits the disk format string when we are
emulating a 'fat' filesystem froma directory. The logic should decide
based on the 'actualType' as a disk type=pool may be converted to a
directory.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/qemu/qemu_command.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index b767a1e15f..c04bba4f02 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1730,7 +1730,7 @@ qemuBuildDriveSourceStr(virDomainDiskDefPtr disk,
     }

     if (disk->src->format > 0 &&
-        disk->src->type != VIR_STORAGE_TYPE_DIR) {
+        actualType != VIR_STORAGE_TYPE_DIR) {
         const char *qemuformat = virStorageFileFormatTypeToString(disk->src->format);
         if (rawluks)
             qemuformat = "luks";
-- 
2.21.0




More information about the libvir-list mailing list