On a Thursday in 2021, Peter Krempa wrote:
The types for the special fields of the 'virtio-blk-pci'
according to
QEMU are:
iothread=<link<iothread>>
ioeventfd=<bool> - on/off (default: true)
event_idx=<bool> - on/off (default: true)
scsi=<bool> - on/off (default: false)
num-queues=<uint16> - (default: 65535)
queue-size=<uint16> - (default: 256)
For all disks we also use the following properties (based on 'scsi-hd'):
device_id=<str>
share-rw=<bool> - (default: false)
drive=<str> - Node name or ID of a block device to use as a backend
chardev=<str> - ID of a chardev to use as a backend <-
vhost-user-blk-pci
bootindex=<int32>
logical_block_size=<size> - A power of two between 512 B and 2 MiB (default: 0)
physical_block_size=<size> - A power of two between 512 B and 2 MiB (default: 0)
wwn=<uint64> - (default: 0)
rotation_rate=<uint16> - (default: 0)
vendor=<str>
product=<str>
removable=<bool> - on/off (default: false)
write-cache=<OnOffAuto> - on/off/auto (default: "auto")
cyls=<uint32> - (default: 0)
heads=<uint32> - (default: 0)
secs=<uint32> - (default: 0)
bios-chs-trans=<BiosAtaTranslation> - Logical CHS translation algorithm,
auto/none/lba/large/rechs (default: "auto") <- ide-hd
serial=<str>
werror=<BlockdevOnError> - Error handling policy, report/ignore/enospc/stop/auto
(default: "auto")
rerror=<BlockdevOnError> - Error handling policy, report/ignore/enospc/stop/auto
(default: "auto")
The 'wwn' field is changed from a hex string to a number since qemu
actually treats it as a number.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_command.c | 360 +++++++-----------
src/qemu/qemu_command.h | 8 +-
src/qemu/qemu_hotplug.c | 6 +-
.../disk-ide-wwn.x86_64-latest.args | 2 +-
.../disk-scsi-disk-wwn.x86_64-latest.args | 4 +-
.../disk-scsi.x86_64-latest.args | 2 +-
6 files changed, 146 insertions(+), 236 deletions(-)
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano