2018-01-31 11:22 GMT+08:00 Martin K. Petersen <martin.peter...@oracle.com>:
>
> Weiping,
>
>> add user friendly command strings sd_wr_cache to enable/disable
>> write&read cache. user can enable both write and read cache by one of
>> the following commands:
>
> I remain unconvinced that introducing redundant option strings is a
> benefit.
>
> These shorthand forms may seem obvious to you, but not to everyone
> else. Adding to the murkiness is that fact that write cache must be
> *enabled* and read cache *disabled* in the protocol. The fact that the
> ??rN and RCD columns below contain inverse values just emphasizes that
> point that "0" and "1" are not a particularly good interface either.
>
> It is also confusing that the existing longhand forms will be printed
> when the user subsequently queries the state instead of what they used
> to toggle it.
>
Yes, indeed.
>
> This, however, is pretty much what I was looking for:
>
>> Encoding                          | WCE RCD | Write_cache Read_cache
>> --------------------------------------------------------------------
>> write through              / w0r1 | 0   0   | off         on
>> none                       / w0r0 | 0   1   | off         off
>> write back                 / w1r1 | 1   0   | on          on
>> write back, no read (daft) / w1r0 | 1   1   | on          off
>
> Please drop the w?r? options and submit a patch with this table and a
> note about the "temporary" prefix. Put it in
> Documentation/scsi/sd-parameters.txt or something to that effect.
>
It's ok for me.
> Bonus points for also documenting the remaining sd sysfs attributes and
> their options.
I'll try.

Thanks
>
> Thanks!
>
> --
> Martin K. Petersen      Oracle Linux Engineering

Reply via email to