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

Peter Krempa posted 4 patches 6 years, 7 months ago
[libvirt] [PATCH v2 2/4] qemu: command: Use 'actualType' when deciding whether to use disk format
Posted by Peter Krempa 6 years, 7 months ago
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@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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 2/4] qemu: command: Use 'actualType' when deciding whether to use disk format
Posted by Ján Tomko 6 years, 7 months ago
On Tue, Jun 25, 2019 at 04:30:31PM +0200, Peter Krempa wrote:
>qemuBuildDriveSourceStr omits the disk format string when we are
>emulating a 'fat' filesystem froma directory. The logic should decide

from a

>based on the 'actualType' as a disk type=pool may be converted to a
>directory.
>
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> src/qemu/qemu_command.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

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