[pve-devel] [PATCH] hdedit : add io throttle max burst

Dietmar Maurer dietmar at proxmox.com
Thu Dec 5 06:43:51 CET 2013


First, I will commit this patch (no need to resend).

Here are just few comment:

> +	if (values.mbps_rd_max && values.mbps_rd) {
> +	    me.drive.mbps_rd_max = values.mbps_rd_max;
> +	} else {
> +	    delete me.drive.mbps_rd_max;
> +	}
> +
>  	if (values.mbps_wr) {
>  	    me.drive.mbps_wr = values.mbps_wr;
>  	} else {
>  	    delete me.drive.mbps_wr;
>  	}
> +
> +	if (values.mbps_wr_max && values.mbps_wr) {
> +	    me.drive.mbps_wr_max = values.mbps_wr_max;
> +	} else {
> +	    delete me.drive.mbps_wr_max;
> +	}
> +
>  	if (values.iops_rd) {
>  	    me.drive.iops_rd = values.iops_rd;
>  	} else {
>  	    delete me.drive.iops_rd;
>  	}
> +
> +	if (values.iops_rd_max && values.iops_rd) {
> +	    me.drive.iops_rd_max = values.iops_rd_max;
> +	} else {
> +	    delete me.drive.iops_rd_max;
> +	}
> +
>  	if (values.iops_wr) {
>  	    me.drive.iops_wr = values.iops_wr;
>  	} else {
>  	    delete me.drive.iops_wr;
>  	}
> 
> +	if (values.iops_wr_max && values.iops_wr) {
> +	    me.drive.iops_wr_max = values.iops_wr_max;
> +	} else {
> +	    delete me.drive.iops_wr_max;
> +	}
> +

As you see, above code repeats. We can avoid that using a loop ;-)

> @@ -123,6 +154,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
> 
>  	me.column1 = [];
>  	me.column2 = [];
> +	me.column3 = [];

column3 is not used anywhere.






More information about the pve-devel mailing list