From: Yan Xiu Wu <wuyx(a)linux.ibm.com>
No need to use both "iotune" and "throttlefilters" for specific disk
Signed-off-by: Yan Xiu Wu <wuyx(a)linux.ibm.com>
---
src/conf/domain_validate.c | 7 +++++++
src/qemu/qemu_driver.c | 5 +++++
2 files changed, 12 insertions(+)
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
index fffe274afc..940c3a92d6 100644
--- a/src/conf/domain_validate.c
+++ b/src/conf/domain_validate.c
@@ -955,6 +955,13 @@ virDomainDiskDefValidate(const virDomainDef *def,
}
}
}
+ if (disk->throttlefilters && (disk->blkdeviotune.group_name ||
+ virDomainBlockIoTuneInfoHasAny(&disk->blkdeviotune))) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("block 'throttlefilters' can't be used together
with 'iotune' for disk '%1$s'"),
+ disk->dst);
+ return -1;
+ }
return 0;
}
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 097366cefb..661dee06cd 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14827,6 +14827,11 @@ qemuDomainDiskBlockIoTuneIsSupported(virDomainDiskDef *disk)
_("block I/O throttling is not supported for disk
'%1$s'"), disk->dst);
return false;
}
+ if (disk->throttlefilters) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("block 'iotune' can't be used together with
'throttlefilters' for disk '%1$s'"), disk->dst);
+ return false;
+ }
return true;
}
--
2.34.1