[PATCH -next 3/6] blk-wbt: don't enable wbt for bio based device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Yu Kuai <yukuai3@xxxxxxxxxx>

Because rq_qos only make sense for rq based device. Instead of fail
from sysfs configuration, make wbt sysfs dentry invisible directly.

Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx>
---
 block/blk-sysfs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 6c1c4ba66bc0..c8e1f1462422 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -686,6 +686,10 @@ static umode_t queue_attr_visible(struct kobject *kobj, struct attribute *attr,
 	    !blk_queue_is_zoned(q))
 		return 0;
 
+#ifdef CONFIG_BLK_WBT
+	if (attr == &queue_wb_lat_entry.attr && !queue_is_mq(q))
+		return 0;
+#endif
 	return attr->mode;
 }
 
-- 
2.39.2




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux