blk-mq: make the sysfs mq/ layout reflect current mappings
Currently blk-mq registers all the hardware queues in sysfs,
regardless of whether it uses them (e.g. they have CPU mappings)
or not. The unused hardware queues lack the cpux/ directories,
and the other sysfs entries (like active, pending, etc) are all
zeroes.
Change this so that sysfs correctly reflects the current mappings
of the hardware queues.
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/block/blk-mq.h b/block/blk-mq.h
index ff5e6bf..de7b3bb 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -55,6 +55,12 @@
extern int blk_mq_hw_queue_to_node(unsigned int *map, unsigned int);
/*
+ * sysfs helpers
+ */
+extern int blk_mq_sysfs_register(struct request_queue *q);
+extern void blk_mq_sysfs_unregister(struct request_queue *q);
+
+/*
* Basic implementation of sparser bitmap, allowing the user to spread
* the bits over more cachelines.
*/