On Wed, Feb 19, 2025 at 22:27:12 +0530, Harikumar Rajkumar wrote:
From: Chun Feng Wu <danielwuwy(a)163.com>
extract common methods from "qemuDomainSetBlockIoTune" to be reused
by throttle handling later, common methods include:
* "qemuDomainValidateBlockIoTune", which is to validate that PARAMS
contains only recognized parameter names with correct types
* "qemuDomainSetBlockIoTuneFields", which is to load parameters into
internal object virDomainBlockIoTuneInfo
* "qemuDomainCheckBlockIoTuneMutualExclusion", which is to check rules
like "total and read/write of bytes_sec cannot be set at the same time"
* "qemuDomainCheckBlockIoTuneMax", which is to check "max" rules
within iotune
Signed-off-by: Chun Feng Wu <danielwuwy(a)163.com>
* Apply suggested coding style changes.
Signed-off-by: Harikumar Rajkumar <harirajkumar230(a)gmail.com>
---
src/qemu/qemu_driver.c | 229 +++++++++++++++++++++++++----------------
1 file changed, 141 insertions(+), 88 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 1d0da1028f..31c543175f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14988,35 +14988,8 @@ qemuDomainCheckBlockIoTuneReset(virDomainDiskDef *disk,
static int
-qemuDomainSetBlockIoTune(virDomainPtr dom,
- const char *path,
- virTypedParameterPtr params,
- int nparams,
- unsigned int flags)
+qemuDomainValidateBlockIoTune(virTypedParameterPtr params, int nparams)
With formatting of this fixed
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>