Re: [PATCH v8 08/18] qemu: Refactor qemuDomainSetBlockIoTune to extract common methods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 19, 2025 at 22:27:12 +0530, Harikumar Rajkumar wrote:
> From: Chun Feng Wu <danielwuwy@xxxxxxx>
> 
> 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@xxxxxxx>
> 
> * Apply suggested coding style changes.
> 
> Signed-off-by: Harikumar Rajkumar <harirajkumar230@xxxxxxxxx>
> ---
>  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@xxxxxxxxxx>



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux