mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
qemu: Assume QEMU_CAPS_BLOCKIO
Introduced in QEMU's commit of v0.13.0-rc0~1072 the .logical_block_size 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. 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
c40ea3eaed
commit
718721f0f9
@ -1751,8 +1751,8 @@ qemuBuildDiskDeviceProps(const virDomainDef *def,
|
||||
g_autofree char *chardev = NULL;
|
||||
g_autofree char *drive = NULL;
|
||||
unsigned int bootindex = 0;
|
||||
unsigned int logical_block_size = 0;
|
||||
unsigned int physical_block_size = 0;
|
||||
unsigned int logical_block_size = disk->blockio.logical_block_size;
|
||||
unsigned int physical_block_size = disk->blockio.physical_block_size;
|
||||
g_autoptr(virJSONValue) wwn = NULL;
|
||||
g_autofree char *serial = NULL;
|
||||
virTristateSwitch removable = VIR_TRISTATE_SWITCH_ABSENT;
|
||||
@ -1886,11 +1886,6 @@ qemuBuildDiskDeviceProps(const virDomainDef *def,
|
||||
if (disk->device != VIR_DOMAIN_DISK_DEVICE_FLOPPY)
|
||||
bootindex = disk->info.effectiveBootIndex;
|
||||
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKIO)) {
|
||||
logical_block_size = disk->blockio.logical_block_size;
|
||||
physical_block_size = disk->blockio.physical_block_size;
|
||||
}
|
||||
|
||||
if (disk->wwn) {
|
||||
unsigned long long w = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user