diff mbox

scsi:Documentation: add sd-parameters.txt

Message ID 20180226140758.GA26422@localhost.didichuxing.com (mailing list archive)
State Accepted
Headers show

Commit Message

weiping zhang Feb. 26, 2018, 2:08 p.m. UTC
this document include SCSI disk and SCSI device parameters, add
cache_type firstly, other parameters will be added later.

Signed-off-by: Weiping Zhang <zhangweiping@didichuxing.com>
---
 Documentation/scsi/sd-parameters.txt | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/scsi/sd-parameters.txt

Comments

Martin K. Petersen March 2, 2018, 2:27 a.m. UTC | #1
Weiping,

> this document include SCSI disk and SCSI device parameters, add
> cache_type firstly, other parameters will be added later.

Applied to 4.17/scsi-queue with a few tweaks. Thank you!
diff mbox

Patch

diff --git a/Documentation/scsi/sd-parameters.txt b/Documentation/scsi/sd-parameters.txt
new file mode 100644
index 0000000..88ea9a2
--- /dev/null
+++ b/Documentation/scsi/sd-parameters.txt
@@ -0,0 +1,23 @@ 
+Linux SCSI sd Parameters
+============================================================
+
+scsi disk
+----------------------------------------
+Path: /sys/block/sdx/device/scsi_disk/x:x:x:x/*
+
+* Name: cache_type
+* Description: enable/disable write&read cache
+
+Encoding                   | WCE RCD | Write_cache Read_cache
+-------------------------------------------------------------
+write through              | 0   0   | off         on
+none                       | 0   1   | off         off
+write back                 | 1   0   | on          on
+write back, no read (daft) | 1   1   | on          off
+
+For "temporary", it only change request_queue's flag, not send
+any command to disk, so actually disk'cache doesn't changed yet.
+
+* Usage:
+echo "write back" > cache_type
+echo "temporary write back" > cache_type