block: add ability to flag write back caching on a device
authorJens Axboe <axboe@fb.com>
Tue, 12 Apr 2016 18:32:46 +0000 (12:32 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 12 Sep 2016 14:56:41 +0000 (08:56 -0600)
commit3f95d460b92f9372baf0c3d141b014300837b367
tree17a8795c5077aef28ae8e6293461bffd17263bcd
parent2dcd0af568b0cf583645c8a317dd12e344b1c72a
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>
Documentation/block/queue-sysfs.txt
block/blk-settings.c
block/blk-sysfs.c
include/linux/blkdev.h