diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 256ef4912c..b0c9fb7059 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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;