mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +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 (!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);
|
||||
}
|
||||
|
||||
|
@ -2263,6 +2263,15 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDomainDiskDef *disk,
|
||||
break;
|
||||
|
||||
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_SD:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user