diff options
author | Jens Axboe <axboe@fb.com> | 2016-04-12 14:32:46 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-04-12 17:46:27 -0400 |
commit | 93e9d8e836cb1a9a58b33eb6643bf061c6119ef2 (patch) | |
tree | 17a50abdadaa58686983510230932323bf5d123c /Documentation/block | |
parent | e0489487ec9cd79ee1fa0dc5d3789c08b0e51a2c (diff) |
block: add ability to flag write back caching on a device
Add an internal helper and flag for setting whether a queue has
write back caching, or write through (or none). Add a sysfs file
to show this as well, and make it changeable from user space.
This will replace the (awkward) blk_queue_flush() interface that
drivers currently use to inform the block layer of write cache state
and capabilities.
Signed-off-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'Documentation/block')
-rw-r--r-- | Documentation/block/queue-sysfs.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/block/queue-sysfs.txt b/Documentation/block/queue-sysfs.txt index e5d914845be6..dce25d848d92 100644 --- a/Documentation/block/queue-sysfs.txt +++ b/Documentation/block/queue-sysfs.txt | |||
@@ -141,6 +141,15 @@ control of this block device to that new IO scheduler. Note that writing | |||
141 | an IO scheduler name to this file will attempt to load that IO scheduler | 141 | an IO scheduler name to this file will attempt to load that IO scheduler |
142 | module, if it isn't already present in the system. | 142 | module, if it isn't already present in the system. |
143 | 143 | ||
144 | write_cache (RW) | ||
145 | ---------------- | ||
146 | When read, this file will display whether the device has write back | ||
147 | caching enabled or not. It will return "write back" for the former | ||
148 | case, and "write through" for the latter. Writing to this file can | ||
149 | change the kernels view of the device, but it doesn't alter the | ||
150 | device state. This means that it might not be safe to toggle the | ||
151 | setting from "write back" to "write through", since that will also | ||
152 | eliminate cache flushes issued by the kernel. | ||
144 | 153 | ||
145 | 154 | ||
146 | Jens Axboe <jens.axboe@oracle.com>, February 2009 | 155 | Jens Axboe <jens.axboe@oracle.com>, February 2009 |