mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-12 04:58:32 +03:00
qemu: Assume QEMU_CAPS_DISK_SHARE_RW
Introduced in QEMU's commit of v2.9.0-rc0~48^2~25 the .share-rw attribute of virtio-blk device is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. The change in controller-order.args is justified, because the qemuxml2argvdatatest runs the test case with very minimalistic set of capabilities, that's nowhere near real life scenario. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d27fb06ec4
commit
6c4148f693
@ -1871,8 +1871,7 @@ qemuBuildDiskDeviceProps(const virDomainDef *def,
|
||||
if (qemuBuildDeviceAddressProps(props, def, &disk->info) < 0)
|
||||
return NULL;
|
||||
|
||||
if (disk->src->shared &&
|
||||
virQEMUCapsGet(qemuCaps, QEMU_CAPS_DISK_SHARE_RW))
|
||||
if (disk->src->shared)
|
||||
shareRW = VIR_TRISTATE_SWITCH_ON;
|
||||
|
||||
if (virStorageSourceGetActualType(disk->src) == VIR_STORAGE_TYPE_VHOST_USER) {
|
||||
|
@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fdr/.config \
|
||||
-device usb-ccid,id=ccid0,bus=usb.0,port=1.1 \
|
||||
-blockdev '{"driver":"file","filename":"/tmp/fdr.img","aio":"native","node-name":"libvirt-2-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
|
||||
-blockdev '{"node-name":"libvirt-2-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"raw","file":"libvirt-2-storage"}' \
|
||||
-device virtio-blk-pci,bus=pci.0,addr=0x5,drive=libvirt-2-format,id=virtio-disk0,bootindex=1 \
|
||||
-device virtio-blk-pci,bus=pci.0,addr=0x5,share-rw=on,drive=libvirt-2-format,id=virtio-disk0,bootindex=1 \
|
||||
-blockdev '{"driver":"file","filename":"/tmp/Fedora-17-x86_64-Live-Desktop.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
|
||||
-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \
|
||||
-device ide-cd,bus=ide.1,unit=0,drive=libvirt-1-format,id=ide0-1-0 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user