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

Dietmar Maurer dietmar at proxmox.com
Thu Dec 5 07:10:36 CET 2013


applied, thanks!

> -----Original Message-----
> From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-
> bounces at pve.proxmox.com] On Behalf Of Alexandre Derumier
> Sent: Mittwoch, 04. Dezember 2013 15:16
> To: pve-devel at pve.proxmox.com
> Subject: [pve-devel] [PATCH] hdedit : add io throttle max burst
> 
> 
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>  www/manager/qemu/HDEdit.js |   73
> ++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 73 insertions(+)
> 
> diff --git a/www/manager/qemu/HDEdit.js b/www/manager/qemu/HDEdit.js
> index af5427a..b1590e5 100644
> --- a/www/manager/qemu/HDEdit.js
> +++ b/www/manager/qemu/HDEdit.js
> @@ -44,22 +44,49 @@ Ext.define('PVE.qemu.HDInputPanel', {
>  	} else {
>  	    delete me.drive.mbps_rd;
>  	}
> +
> +	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;
> +	}
> +
>  	var params = {};
> 
>  	params[confid] = PVE.Parser.printQemuDrive(me.drive);
> @@ -106,6 +133,10 @@ Ext.define('PVE.qemu.HDInputPanel', {
>  	values.mbps_wr = drive.mbps_wr;
>  	values.iops_rd = drive.iops_rd;
>  	values.iops_wr = drive.iops_wr;
> +	values.mbps_rd_max = drive.mbps_rd_max;
> +	values.mbps_wr_max = drive.mbps_wr_max;
> +	values.iops_rd_max = drive.iops_rd_max;
> +	values.iops_wr_max = drive.iops_wr_max;
> 
>  	me.setValues(values);
>      },
> @@ -123,6 +154,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
> 
>  	me.column1 = [];
>  	me.column2 = [];
> +	me.column3 = [];
> 
>  	if (!me.confid || me.unused) {
>  	    me.bussel = Ext.createWidget('PVE.form.ControllerSelector', { @@ -
> 252,6 +284,17 @@ Ext.define('PVE.qemu.HDInputPanel', {
>          });
>          me.column2.push(me.mbps_rd);
> 
> +        me.mbps_rd_max = Ext.widget('numberfield', {
> +            name: 'mbps_rd_max',
> +            minValue: 1,
> +	    step: 1,
> +            fieldLabel: gettext('Read max burst') + ' (MB)',
> +	    labelWidth: width2,
> +	    emptyText: gettext('default')
> +        });
> +        me.column2.push(me.mbps_rd_max);
> +
> +
>          me.mbps_wr = Ext.widget('numberfield', {
>              name: 'mbps_wr',
>              minValue: 1,
> @@ -262,6 +305,16 @@ Ext.define('PVE.qemu.HDInputPanel', {
>          });
>          me.column2.push(me.mbps_wr);
> 
> +        me.mbps_wr_max = Ext.widget('numberfield', {
> +            name: 'mbps_wr_max',
> +            minValue: 1,
> +	    step: 1,
> +            fieldLabel: gettext('Write max burst') + ' (MB)',
> +	    labelWidth: width2,
> +	    emptyText: gettext('default')
> +        });
> +        me.column2.push(me.mbps_wr_max);
> +
>          me.iops_rd = Ext.widget('numberfield', {
>              name: 'iops_rd',
>              minValue: 10,
> @@ -272,6 +325,16 @@ Ext.define('PVE.qemu.HDInputPanel', {
>          });
>          me.column2.push(me.iops_rd);
> 
> +        me.iops_rd_max = Ext.widget('numberfield', {
> +            name: 'iops_rd_max',
> +            minValue: 10,
> +	    step: 10,
> +            fieldLabel: gettext('Read max burst') + ' (ops)',
> +	    labelWidth: width2,
> +	    emptyText: gettext('default')
> +        });
> +        me.column2.push(me.iops_rd_max);
> +
>          me.iops_wr = Ext.widget('numberfield', {
>              name: 'iops_wr',
>              minValue: 10,
> @@ -282,6 +345,16 @@ Ext.define('PVE.qemu.HDInputPanel', {
>          });
>          me.column2.push(me.iops_wr);
> 
> +        me.iops_wr_max = Ext.widget('numberfield', {
> +            name: 'iops_wr_max',
> +            minValue: 10,
> +	    step: 10,
> +            fieldLabel: gettext('Write max burst') + ' (ops)',
> +	    labelWidth: width2,
> +	    emptyText: gettext('default')
> +        });
> +        me.column2.push(me.iops_wr_max);
> +
>  	me.callParent();
>      }
>  });
> --
> 1.7.10.4
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel





More information about the pve-devel mailing list