qemu: block: Handle iomode property for json 'file' driver

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Peter Krempa 2017-12-05 17:05:12 +01:00
parent 0304e675c0
commit bbf204dab7

View File

@ -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;
}