blk-sysfs: add a new attr_group for blk_mq
authorYu Kuai <yukuai3@huawei.com>
Sat, 27 May 2023 01:06:44 +0000 (09:06 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Jun 2023 15:53:36 +0000 (09:53 -0600)
commit6d85ebf95c44e52337ca1d07f0db4b435d1e6762
tree40f2398571a652edc60fd1af5939b0cd4c88e429
parenteebc21d12f56c1e09a163abf91e351fa2a55a938
blk-sysfs: add a new attr_group for blk_mq

Currently wbt sysfs entry is created for bio based device, and wbt can
be enabled for such device through sysfs while it doesn't make sense
because wbt can only work for rq based device. In the meantime, there
are other similar sysfs entries.

Fix this by adding a new attr_group for blk_mq, and sysfs entries will
only be created when the device is rq based.

Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230527010644.647900-6-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-sysfs.c