[PATCH 080/103] qemuBuildDiskCommandLine: Generate via JSON

Ján Tomko jtomko at redhat.com
Mon Oct 11 15:31:56 UTC 2021


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 at 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 at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20211011/252ee8a6/attachment-0001.sig>


More information about the libvir-list mailing list