[RFC PATCH 06/30] qemu: block: Handle iomode property for json 'file' driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_block.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index e7bd6c909d..6cf41cf544 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -977,11 +977,17 @@ qemuBlockStorageSourceGetSshProps(virStorageSourcePtr src)
 static virJSONValuePtr
 qemuBlockStorageSourceGetFileProps(virStorageSourcePtr src)
 {
+    const char *iomode = NULL;
     virJSONValuePtr ret = NULL;

+    if (src->iomode != VIR_DOMAIN_DISK_IO_DEFAULT)
+        iomode = virDomainDiskIoTypeToString(src->iomode);
+
     ignore_value(virJSONValueObjectCreate(&ret,
                                           "s:driver", "file",
-                                          "s:filename", src->path, NULL) < 0);
+                                          "s:filename", src->path,
+                                          "S:aio", iomode,
+                                          NULL) < 0);
     return ret;
 }

-- 
2.14.3

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux