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

2017-03-07 Thread Dietmar Maurer
> > I wonder why we compare to a string '0'?? AFAIK nowritecache is an > > boolean/integer? > > > The reason for this is that the API returns a string. Eg. > values.nowritecache is a string and not an integer/boolean. I thought this is already fixed - will test tomorrow.

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

2017-03-07 Thread Michael Rasmussen
On Tue, 7 Mar 2017 19:38:38 +0100 (CET) Dietmar Maurer wrote: > > + // reverse the logic for the checkbox > > + values.nowritecache = values.nowritecache == '0'?'1':'0'; > > I wonder why we compare to a string '0'?? AFAIK nowritecache is an > boolean/integer? > The

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

2017-03-07 Thread Dietmar Maurer
> > But we can apply this unless we have a better solution. > > > Any news regarding adding this patch? Sorry, but all sent patches are clumsy, and I am not really keen to apply them. Sent a further question to Dominik, and I will try to commit a solution asap. __

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

2017-03-07 Thread Dietmar Maurer
> + // reverse the logic for the checkbox > + values.nowritecache = values.nowritecache == '0'?'1':'0'; I wonder why we compare to a string '0'?? AFAIK nowritecache is an boolean/integer? ___ pve-devel mailing list pve-de

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

2017-03-07 Thread Michael Rasmussen
On Wed, 22 Feb 2017 18:21:19 +0100 (CET) Dietmar Maurer wrote: > > values.enable = values.disable ? 0 : 1; > > + // reverse the logic for the checkbox > > + values.nowritecache = values.nowritecache == '0'?'1':'0'; > > It would be much nicer if

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

2017-02-22 Thread Dietmar Maurer
> values.enable = values.disable ? 0 : 1; > + // reverse the logic for the checkbox > + values.nowritecache = values.nowritecache == '0'?'1':'0'; It would be much nicer if this gets handled by the form element itself ... But we can apply this

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

2017-02-22 Thread Michael Rasmussen
On Wed, 22 Feb 2017 14:42:28 +0100 Dominik Csapak 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 > --- > changes from v1: > reverse also the logic w

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

2017-02-22 Thread Dominik Csapak
the logic was reversed, checking writecache enabled 'nowritecache', now the logic is correct, setting 'nowritecache' if 'writecache' is unchecked Signed-off-by: Dominik Csapak --- changes from v1: reverse also the logic when using in an editwindow have to use strings because we get a string fro

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

2017-02-22 Thread Dominik Csapak
On 02/22/2017 02:28 PM, datanom.net wrote: On 2017-02-22 14:05, Dominik Csapak wrote: On 02/22/2017 02:03 PM, Fabian Grünbichler wrote: On Wed, Feb 22, 2017 at 11:50:56AM +0100, Emmanuel Kasper wrote: no idea what extJS does here - but it looks like this will always result in nowritecache being

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

2017-02-22 Thread datanom.net
On 2017-02-22 14:05, Dominik Csapak wrote: On 02/22/2017 02:03 PM, Fabian Grünbichler wrote: On Wed, Feb 22, 2017 at 11:50:56AM +0100, Emmanuel Kasper wrote: no idea what extJS does here - but it looks like this will always result in nowritecache being set to 0, no matter whether the check box

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

2017-02-22 Thread Dominik Csapak
On 02/22/2017 02:03 PM, Fabian Grünbichler wrote: On Wed, Feb 22, 2017 at 11:50:56AM +0100, Emmanuel Kasper wrote: On 02/22/2017 11:12 AM, Dominik Csapak wrote: the logic was reversed, checking writecache enabled 'nowritecache', now the logic is correct, setting 'nowritecache' if 'writecache' i

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

2017-02-22 Thread Fabian Grünbichler
On Wed, Feb 22, 2017 at 11:50:56AM +0100, Emmanuel Kasper wrote: > On 02/22/2017 11:12 AM, Dominik Csapak wrote: > > the logic was reversed, checking writecache enabled 'nowritecache', > > now the logic is correct, setting 'nowritecache' if 'writecache' is > > unchecked > > > > Signed-off-by: Domi

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

2017-02-22 Thread Emmanuel Kasper
On 02/22/2017 11:12 AM, Dominik Csapak 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 > --- > i think this is a better and more elegant approach to the

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

2017-02-22 Thread Dominik Csapak
the logic was reversed, checking writecache enabled 'nowritecache', now the logic is correct, setting 'nowritecache' if 'writecache' is unchecked Signed-off-by: Dominik Csapak --- i think this is a better and more elegant approach to the patch from m...@datanom.net, and still has the same functio