mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
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:
parent
0304e675c0
commit
bbf204dab7
@ -977,11 +977,17 @@ qemuBlockStorageSourceGetSshProps(virStorageSourcePtr src)
|
|||||||
static virJSONValuePtr
|
static virJSONValuePtr
|
||||||
qemuBlockStorageSourceGetFileProps(virStorageSourcePtr src)
|
qemuBlockStorageSourceGetFileProps(virStorageSourcePtr src)
|
||||||
{
|
{
|
||||||
|
const char *iomode = NULL;
|
||||||
virJSONValuePtr ret = NULL;
|
virJSONValuePtr ret = NULL;
|
||||||
|
|
||||||
|
if (src->iomode != VIR_DOMAIN_DISK_IO_DEFAULT)
|
||||||
|
iomode = virDomainDiskIoTypeToString(src->iomode);
|
||||||
|
|
||||||
ignore_value(virJSONValueObjectCreate(&ret,
|
ignore_value(virJSONValueObjectCreate(&ret,
|
||||||
"s:driver", "file",
|
"s:driver", "file",
|
||||||
"s:filename", src->path, NULL) < 0);
|
"s:filename", src->path,
|
||||||
|
"S:aio", iomode,
|
||||||
|
NULL) < 0);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user