Files
linux-stable-mirror/include/linux
Christoph HellwigandGreg Kroah-Hartman 00c0b2825b block: don't allow enabling a cache on devices that don't support it
[ Upstream commit 43c9835b14 ]

Currently the write_cache attribute allows enabling the QUEUE_FLAG_WC
flag on devices that never claimed the capability.

Fix that by adding a QUEUE_FLAG_HW_WC flag that is set by
blk_queue_write_cache and guards re-enabling the cache through sysfs.

Note that any rescan that calls blk_queue_write_cache will still
re-enable the write cache as in the current code.

Fixes: 93e9d8e836 ("block: add ability to flag write back caching on a device")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230707094239.107968-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:42:40 +02:00
..
2023-07-19 16:21:11 +02:00
2023-06-21 16:01:00 +02:00
2023-07-19 16:21:05 +02:00
2023-08-30 16:11:10 +02:00
2023-05-30 14:03:22 +01:00
2023-08-03 10:23:48 +02:00
2023-07-19 16:21:54 +02:00
2023-08-16 18:27:20 +02:00