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

2018-01-23 Thread weiping zhang
2018-01-23 8:23 GMT+08:00 Martin K. Petersen : > > Hi Weiping, > >> currently, there are four combinations as following: "write through", >> "none", "write back", "write back, no read (daft)" >> >> cache_type can control both write and read cache, but for "write >>

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

2018-01-22 Thread Martin K. Petersen
Hi Weiping, > currently, there are four combinations as following: "write through", > "none", "write back", "write back, no read (daft)" > > cache_type can control both write and read cache, but for "write > through" and "write back" we can not know clearly how to control the > read cache.

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

2018-01-18 Thread weiping zhang
2018-01-19 10:41 GMT+08:00 Martin K. Petersen : > > Hi Weiping, > >> Add user friendly command strings sd_wce_rcd to enable/disable >> write cache. User can enable both write and read cache by one of >> the following commands: > > I am not entirely sure what the

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

2018-01-18 Thread Martin K. Petersen
Hi Weiping, > Add user friendly command strings sd_wce_rcd to enable/disable > write cache. User can enable both write and read cache by one of > the following commands: I am not entirely sure what the rationale is behind your patch. Is there some deficiency in the existing cache control

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

2018-01-18 Thread James Bottomley
On Thu, 2018-01-18 at 22:19 +0800, weiping zhang wrote: > - return sprintf(buf, "%s\n", sd_cache_types[ct]); > + return sprintf(buf, "%s\n%s\nwrite:%s, read:%s\n", > sd_cache_types[ct], > + sd_wce_rcd[ct], sdkp->WCE ? "on" : "off", > + sdkp->RCD ?

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

2018-01-18 Thread weiping zhang
Add user friendly command strings sd_wce_rcd to enable/disable write cache. User can enable both write and read cache by one of the following commands: echo 10 > cache_type echo "write back" > cache_type wce rcd write_cache read_cache 0 0 off on 0 1 off off 1 0 on