Re: [PATCH v3] scsi: sd: add new match array for cache_type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


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.

Bonus points for also documenting the remaining sd sysfs attributes and
their options.

Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux