Re: [PATCH] scsi: sd: Fix cache_type_store()

2019-01-03 Thread Martin K. Petersen
Ivan, > + * The write protect (WP) bit for mode data sent with a MODE SELECT > + * command shall be ignored by the device server. > + * ... > + * The DPOFUA bit is reserved for mode data sent with a MODE SELECT > + * command. Wonderfully consistent

[PATCH] scsi: sd: Fix cache_type_store()

2018-12-22 Thread Ivan Mironov
Changing of caching mode via /sys/devices/.../scsi_disk/.../cache_type may fail if device responses to MODE SENSE command with DPOFUA flag set, and then checks this flag to be not set on MODE SELECT command. When trying to change cache_type, write always fails: # echo "none" >cache_type