qemu: command: Move blkiotune checks to qemuCheckDiskConfig

This commit is contained in:
Peter Krempa 2017-11-01 11:47:19 +01:00
parent 5121457cad
commit cf1fcd7b51

View File

@ -1221,6 +1221,9 @@ int
qemuCheckDiskConfig(virDomainDiskDefPtr disk,
virQEMUCapsPtr qemuCaps)
{
if (qemuCheckDiskConfigBlkdeviotune(disk, qemuCaps) < 0)
return -1;
if (virDiskNameToIndex(disk->dst) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("unsupported disk type '%s'"), disk->dst);
@ -1782,9 +1785,6 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk,
virDomainDiskIoTypeToString(disk->iomode));
}
if (qemuCheckDiskConfigBlkdeviotune(disk, qemuCaps) < 0)
goto error;
#define IOTUNE_ADD(_field, _label) \
if (disk->blkdeviotune._field) { \
virBufferAsprintf(&opt, ",throttling." _label "=%llu", \