[pve-devel] [PATCH manager] correctly set 'nowritecache' on zfsplugin

Michael Rasmussen mir at datanom.net
Wed Feb 22 17:21:20 CET 2017


On Wed, 22 Feb 2017 14:42:28 +0100
Dominik Csapak <d.csapak at proxmox.com> wrote:

> the logic was reversed, checking writecache enabled 'nowritecache',
> now the logic is correct, setting 'nowritecache' if 'writecache' is
> unchecked
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> changes from v1:
>  reverse also the logic when using in an editwindow
>  have to use strings because we get a string from the api
>  www/manager6/storage/ZFSEdit.js | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/www/manager6/storage/ZFSEdit.js b/www/manager6/storage/ZFSEdit.js
> index 12d6af1..b0d84ab 100644
> --- a/www/manager6/storage/ZFSEdit.js
> +++ b/www/manager6/storage/ZFSEdit.js
> @@ -91,8 +91,9 @@ Ext.define('PVE.storage.ZFSInputPanel', {
>  	    {
>  		xtype: 'pvecheckbox',
>  		name: 'nowritecache',
> -		checked: true,
> -		uncheckedValue: 0,
> +		checked: false,
> +		uncheckedValue: 1,
> +		inputValue: 0,
>  		fieldLabel: gettext('Write cache')
>  	    },
>  	    {
> @@ -157,6 +158,8 @@ Ext.define('PVE.storage.ZFSEdit', {
>                          values.nodes = values.nodes.split(',');
>                      }
>                      values.enable = values.disable ? 0 : 1;
> +		    // reverse the logic for the checkbox
> +		    values.nowritecache = values.nowritecache == '0'?'1':'0';
>                      ipanel.setValues(values);
>                  }
>              });
Yes, with above added the patch work.

-- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
/usr/games/fortune -es says:
Some circumstantial evidence is very strong, as when you find a trout in
the milk.
		-- Thoreau
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20170222/bb6b2dcf/attachment.sig>


More information about the pve-devel mailing list