mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-27 16:15:23 +00:00
2c4c347c4b
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>
28 lines
537 B
JSON
28 lines
537 B
JSON
{
|
|
"node-name": "#block126",
|
|
"read-only": false,
|
|
"driver": "qcow2",
|
|
"file": "#block004",
|
|
"backing": "#block313"
|
|
}
|
|
{
|
|
"driver": "file",
|
|
"filename": "/var/lib/libvirt/images/rhel7.3.1507297895",
|
|
"node-name": "#block004",
|
|
"auto-read-only": true,
|
|
"discard": "unmap"
|
|
}
|
|
{
|
|
"node-name": "#block313",
|
|
"read-only": true,
|
|
"driver": "qcow2",
|
|
"file": "#block256"
|
|
}
|
|
{
|
|
"driver": "file",
|
|
"filename": "/var/lib/libvirt/images/rhel7.3.1484071872",
|
|
"node-name": "#block256",
|
|
"auto-read-only": true,
|
|
"discard": "unmap"
|
|
}
|