1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00
libvirt/tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads.json
Peter Krempa 2c4c347c4b qemu: block: Use 'auto-read-only' instead of 'read-only' for backing chain
To allow using -blockdev with blockjobs QEMU needs to reopen files in
read-write mode when modifying the backing chain. To achieve this we
need to use 'auto-read-only' for the backing files rather than the
normal 'read-only' property. That way qemu knows that the files need to
be reopened.

Note that the format drivers (e.g. qcow2) are still opened with the
read-only property enabled when being a member of the backing chain
since they are supposed to be immutable unless a block job is started.

QEMU v4.0 (since commit 23dece19da4) allows also dynamic behaviour for
auto-read-only which allows us to use sVirt as we only grant write
permissions to files when doing a blockjob.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-07-18 17:59:34 +02:00

67 lines
1.1 KiB
JSON

{
"node-name": "node-a-f",
"read-only": false,
"driver": "qcow",
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"aio": "threads",
"node-name": "node-a-s",
"auto-read-only": true,
"discard": "unmap"
}
{
"node-name": "node-b-f",
"read-only": true,
"driver": "qed",
"file": "node-b-s",
"backing": "node-c-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"aio": "threads",
"node-name": "node-b-s",
"auto-read-only": true,
"discard": "unmap"
}
{
"node-name": "node-c-f",
"read-only": true,
"driver": "vmdk",
"file": "node-c-s",
"backing": "node-d-f"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"auto-read-only": true,
"discard": "unmap"
}
{
"node-name": "node-d-f",
"read-only": true,
"driver": "raw",
"file": "node-d-s"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"aio": "threads",
"node-name": "node-d-s",
"auto-read-only": true,
"discard": "unmap"
}