From: Peter Krempa Date: Tue, 5 Dec 2017 16:05:12 +0000 (+0100) Subject: qemu: block: Handle iomode property for json 'file' driver X-Git-Tag: v4.4.0-rc1~287 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbf204dab798aad5e21d48f8d8f2ff3e6c614aeb;p=thirdparty%2Flibvirt.git qemu: block: Handle iomode property for json 'file' driver Signed-off-by: Peter Krempa Reviewed-by: John Ferlan --- diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 537a41022f..bc03af89b1 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; }