1 #ifndef INT_BLK_MQ_DEBUGFS_H
2 #define INT_BLK_MQ_DEBUGFS_H
4 #ifdef CONFIG_BLK_DEBUG_FS
6 #include <linux/seq_file.h>
8 struct blk_mq_debugfs_attr {
11 int (*show)(void *, struct seq_file *);
12 ssize_t (*write)(void *, const char __user *, size_t, loff_t *);
13 /* Set either .show or .seq_ops. */
14 const struct seq_operations *seq_ops;
17 int __blk_mq_debugfs_rq_show(struct seq_file *m, struct request *rq);
18 int blk_mq_debugfs_rq_show(struct seq_file *m, void *v);
20 int blk_mq_debugfs_register(struct request_queue *q);
21 void blk_mq_debugfs_unregister(struct request_queue *q);
22 int blk_mq_debugfs_register_hctx(struct request_queue *q,
23 struct blk_mq_hw_ctx *hctx);
24 void blk_mq_debugfs_unregister_hctx(struct blk_mq_hw_ctx *hctx);
25 int blk_mq_debugfs_register_hctxs(struct request_queue *q);
26 void blk_mq_debugfs_unregister_hctxs(struct request_queue *q);
28 int blk_mq_debugfs_register_sched(struct request_queue *q);
29 void blk_mq_debugfs_unregister_sched(struct request_queue *q);
30 int blk_mq_debugfs_register_sched_hctx(struct request_queue *q,
31 struct blk_mq_hw_ctx *hctx);
32 void blk_mq_debugfs_unregister_sched_hctx(struct blk_mq_hw_ctx *hctx);
34 static inline int blk_mq_debugfs_register(struct request_queue *q)
39 static inline void blk_mq_debugfs_unregister(struct request_queue *q)
43 static inline int blk_mq_debugfs_register_hctx(struct request_queue *q,
44 struct blk_mq_hw_ctx *hctx)
49 static inline void blk_mq_debugfs_unregister_hctx(struct blk_mq_hw_ctx *hctx)
53 static inline int blk_mq_debugfs_register_hctxs(struct request_queue *q)
58 static inline void blk_mq_debugfs_unregister_hctxs(struct request_queue *q)
62 static inline int blk_mq_debugfs_register_sched(struct request_queue *q)
67 static inline void blk_mq_debugfs_unregister_sched(struct request_queue *q)
71 static inline int blk_mq_debugfs_register_sched_hctx(struct request_queue *q,
72 struct blk_mq_hw_ctx *hctx)
77 static inline void blk_mq_debugfs_unregister_sched_hctx(struct blk_mq_hw_ctx *hctx)