On 10/14/20 10:42 PM, Daniel Henrique Barboza wrote:
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/qemu/qemu_command.c | 7 -------
src/qemu/qemu_validate.c | 10 ++++++++++
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index b2c6bd43a2..a5abd814a2 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1683,13 +1683,6 @@ qemuBuildDiskDeviceStr(const virDomainDef *def,
}
if (disk->queues) {
- if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("num-queues property isn't supported by this
"
- "QEMU binary"));
- return NULL;
- }
-
virBufferAsprintf(&opt, ",num-queues=%u", disk->queues);
}
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 289b99eea7..4a74265ced 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -2265,6 +2265,16 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDomainDiskDef
*disk,
break;
case VIR_DOMAIN_DISK_BUS_VIRTIO:
+ if (disk->queues) {
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES)) {
Could be merged into one if ().
Michal