mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 07:05:28 +00:00
qemu_command.c: move DISK_BUS_VIRTIO validation to qemu_validate.c
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
da1748cab1
commit
216e4b1c45
@ -1683,13 +1683,6 @@ qemuBuildDiskDeviceStr(const virDomainDef *def,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (disk->queues) {
|
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);
|
virBufferAsprintf(&opt, ",num-queues=%u", disk->queues);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2263,6 +2263,15 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDomainDiskDef *disk,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_DISK_BUS_VIRTIO:
|
case VIR_DOMAIN_DISK_BUS_VIRTIO:
|
||||||
|
if (disk->queues &&
|
||||||
|
!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 -1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_DISK_BUS_XEN:
|
case VIR_DOMAIN_DISK_BUS_XEN:
|
||||||
case VIR_DOMAIN_DISK_BUS_SD:
|
case VIR_DOMAIN_DISK_BUS_SD:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user