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

Dominik Csapak d.csapak at proxmox.com
Wed Feb 22 14:05:58 CET 2017


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' is
>>> unchecked
>>>
>>> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
>>> ---
>>> i think this is a better and more elegant approach to the patch from
>>> mir at datanom.net, and still has the same functionality
>>>
>>>  www/manager6/storage/ZFSEdit.js | 5 +++--
>>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/www/manager6/storage/ZFSEdit.js b/www/manager6/storage/ZFSEdit.js
>>> index 12d6af1..094aa6a 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')
>>>  	    },
>>>  	    {
>>
>> looks good to me
>> IMHO, using framework facilities here allows to keep us a smaller code base
>
> 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 is
> ticked or not..
>

no because the uncheckedValue is 1




More information about the pve-devel mailing list