mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-06 11:49:29 +00:00
qemu: add QEMU_CAPS_STORAGE_WERROR
Detect the werror property on SCSI and virtio disks. But clear it if the QEMU supports usb-storage device without it also supporting this option for usb-storage. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
248d205171
commit
47e84b06ec
@ -567,6 +567,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
|
||||
"query-named-block-nodes.flat",
|
||||
"blockdev-snapshot.allow-write-only-overlay",
|
||||
"blockdev-reopen",
|
||||
"storage.werror",
|
||||
);
|
||||
|
||||
|
||||
@ -1304,6 +1305,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBlk[] = {
|
||||
{ "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM },
|
||||
{ "ats", QEMU_CAPS_VIRTIO_PCI_ATS },
|
||||
{ "write-cache", QEMU_CAPS_DISK_WRITE_CACHE },
|
||||
{ "werror", QEMU_CAPS_STORAGE_WERROR },
|
||||
};
|
||||
|
||||
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioNet[] = {
|
||||
@ -1339,6 +1341,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsSCSIDisk[] = {
|
||||
{ "share-rw", QEMU_CAPS_DISK_SHARE_RW },
|
||||
{ "write-cache", QEMU_CAPS_DISK_WRITE_CACHE },
|
||||
{ "device_id", QEMU_CAPS_SCSI_DISK_DEVICE_ID },
|
||||
{ "werror", QEMU_CAPS_STORAGE_WERROR },
|
||||
};
|
||||
|
||||
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsIDEDrive[] = {
|
||||
@ -4853,6 +4856,11 @@ virQEMUCapsInitProcessCapsInterlock(virQEMUCapsPtr qemuCaps)
|
||||
{
|
||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV))
|
||||
virQEMUCapsClear(qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP);
|
||||
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_USB_STORAGE) &&
|
||||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_STORAGE_WERROR)) {
|
||||
virQEMUCapsClear(qemuCaps, QEMU_CAPS_STORAGE_WERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -548,6 +548,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
|
||||
QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT, /* query-named-block-nodes supports the 'flat' option */
|
||||
QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY, /* blockdev-snapshot has the 'allow-write-only-overlay' feature */
|
||||
QEMU_CAPS_BLOCKDEV_REOPEN, /* 'blockdev-reopen' qmp command is supported */
|
||||
QEMU_CAPS_STORAGE_WERROR, /* virtio-blk,scsi-hd.werror */
|
||||
|
||||
QEMU_CAPS_LAST /* this must always be the last item */
|
||||
} virQEMUCapsFlags;
|
||||
|
@ -106,6 +106,7 @@
|
||||
<flag name='iothread.poll-max-ns'/>
|
||||
<flag name='query-cpu-model-baseline'/>
|
||||
<flag name='query-cpu-model-comparison'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>2010000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>39100287</microcodeVersion>
|
||||
|
@ -113,6 +113,7 @@
|
||||
<flag name='iothread.poll-max-ns'/>
|
||||
<flag name='query-cpu-model-baseline'/>
|
||||
<flag name='query-cpu-model-comparison'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>2011000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>39100288</microcodeVersion>
|
||||
|
@ -125,6 +125,7 @@
|
||||
<flag name='query-cpu-model-baseline'/>
|
||||
<flag name='query-cpu-model-comparison'/>
|
||||
<flag name='drive-nvme'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>2012000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>39100289</microcodeVersion>
|
||||
|
@ -90,6 +90,7 @@
|
||||
<flag name='virtual-css-bridge'/>
|
||||
<flag name='sdl-gl'/>
|
||||
<flag name='zpci'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>2007000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>39100245</microcodeVersion>
|
||||
|
@ -95,6 +95,7 @@
|
||||
<flag name='zpci'/>
|
||||
<flag name='query-cpu-model-baseline'/>
|
||||
<flag name='query-cpu-model-comparison'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>2007093</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>39100246</microcodeVersion>
|
||||
|
@ -100,6 +100,7 @@
|
||||
<flag name='iothread.poll-max-ns'/>
|
||||
<flag name='query-cpu-model-baseline'/>
|
||||
<flag name='query-cpu-model-comparison'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>2009000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>39100247</microcodeVersion>
|
||||
|
@ -95,6 +95,7 @@
|
||||
<flag name='memory-backend-file.align'/>
|
||||
<flag name='ramfb'/>
|
||||
<flag name='drive-nvme'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>3000000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>0</microcodeVersion>
|
||||
|
@ -95,6 +95,7 @@
|
||||
<flag name='memory-backend-file.align'/>
|
||||
<flag name='ramfb'/>
|
||||
<flag name='drive-nvme'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>3000000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>0</microcodeVersion>
|
||||
|
@ -128,6 +128,7 @@
|
||||
<flag name='query-cpu-model-comparison'/>
|
||||
<flag name='ramfb'/>
|
||||
<flag name='drive-nvme'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>3000000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>39100239</microcodeVersion>
|
||||
|
@ -203,6 +203,7 @@
|
||||
<flag name='ramfb'/>
|
||||
<flag name='drive-nvme'/>
|
||||
<flag name='i8042'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>3000000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>43100239</microcodeVersion>
|
||||
|
@ -160,6 +160,7 @@
|
||||
<flag name='bochs-display'/>
|
||||
<flag name='drive-nvme'/>
|
||||
<flag name='i8042'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>3000091</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>42900240</microcodeVersion>
|
||||
|
@ -206,6 +206,7 @@
|
||||
<flag name='ramfb'/>
|
||||
<flag name='drive-nvme'/>
|
||||
<flag name='i8042'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>3000092</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>43100240</microcodeVersion>
|
||||
|
@ -169,6 +169,7 @@
|
||||
<flag name='ramfb'/>
|
||||
<flag name='arm-max-cpu'/>
|
||||
<flag name='drive-nvme'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>4000000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>61700240</microcodeVersion>
|
||||
|
@ -174,6 +174,7 @@
|
||||
<flag name='machine.pseries.cap-ccf-assist'/>
|
||||
<flag name='drive-nvme'/>
|
||||
<flag name='i8042'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>4000000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>42900240</microcodeVersion>
|
||||
|
@ -170,6 +170,7 @@
|
||||
<flag name='bochs-display'/>
|
||||
<flag name='migration-file-drop-cache'/>
|
||||
<flag name='drive-nvme'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>4000000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>0</microcodeVersion>
|
||||
|
@ -170,6 +170,7 @@
|
||||
<flag name='bochs-display'/>
|
||||
<flag name='migration-file-drop-cache'/>
|
||||
<flag name='drive-nvme'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>4000000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>0</microcodeVersion>
|
||||
|
@ -136,6 +136,7 @@
|
||||
<flag name='query-cpu-model-baseline'/>
|
||||
<flag name='query-cpu-model-comparison'/>
|
||||
<flag name='drive-nvme'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>4000000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>39100240</microcodeVersion>
|
||||
|
@ -211,6 +211,7 @@
|
||||
<flag name='ramfb'/>
|
||||
<flag name='drive-nvme'/>
|
||||
<flag name='i8042'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>4000000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>43100240</microcodeVersion>
|
||||
|
@ -217,6 +217,7 @@
|
||||
<flag name='drive-nvme'/>
|
||||
<flag name='smp-dies'/>
|
||||
<flag name='i8042'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>4001000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>43100241</microcodeVersion>
|
||||
|
@ -179,6 +179,7 @@
|
||||
<flag name='rng-builtin'/>
|
||||
<flag name='virtio-net.failover'/>
|
||||
<flag name='vhost-user-fs'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>4001050</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>61700242</microcodeVersion>
|
||||
|
@ -179,6 +179,7 @@
|
||||
<flag name='smp-dies'/>
|
||||
<flag name='i8042'/>
|
||||
<flag name='rng-builtin'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>4001050</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>42900242</microcodeVersion>
|
||||
|
@ -138,6 +138,7 @@
|
||||
<flag name='smp-dies'/>
|
||||
<flag name='rng-builtin'/>
|
||||
<flag name='vhost-user-fs'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>4001050</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>39100242</microcodeVersion>
|
||||
|
@ -223,6 +223,7 @@
|
||||
<flag name='rng-builtin'/>
|
||||
<flag name='virtio-net.failover'/>
|
||||
<flag name='vhost-user-fs'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>4002000</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>43100242</microcodeVersion>
|
||||
|
@ -181,6 +181,7 @@
|
||||
<flag name='virtio-net.failover'/>
|
||||
<flag name='cpu.kvm-no-adjvtime'/>
|
||||
<flag name='vhost-user-fs'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>4002050</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>61700241</microcodeVersion>
|
||||
|
@ -189,6 +189,7 @@
|
||||
<flag name='vhost-user-fs'/>
|
||||
<flag name='query-named-block-nodes.flat'/>
|
||||
<flag name='blockdev-snapshot.allow-write-only-overlay'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>4002050</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>42900241</microcodeVersion>
|
||||
|
@ -226,6 +226,7 @@
|
||||
<flag name='vhost-user-fs'/>
|
||||
<flag name='query-named-block-nodes.flat'/>
|
||||
<flag name='blockdev-snapshot.allow-write-only-overlay'/>
|
||||
<flag name='storage.werror'/>
|
||||
<version>4002050</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>43100241</microcodeVersion>
|
||||
|
Loading…
x
Reference in New Issue
Block a user