diff options
author | Omar Sandoval <osandov@fb.com> | 2017-05-04 03:31:30 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-05-04 10:23:44 -0400 |
commit | d173a25165c124442182f6b21d0c2ec381a0eebe (patch) | |
tree | eb0a41f87bfcacbdf1795b527ae58fd4200831ea /block | |
parent | 18d4d7d0571f5acc9de638ea3a33e8064deaceca (diff) |
blk-mq: move debugfs declarations to a separate header file
Preparation for adding more declarations.
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 1 | ||||
-rw-r--r-- | block/blk-mq-debugfs.c | 1 | ||||
-rw-r--r-- | block/blk-mq-debugfs.h | 29 | ||||
-rw-r--r-- | block/blk-mq-sysfs.c | 1 | ||||
-rw-r--r-- | block/blk-mq.h | 28 | ||||
-rw-r--r-- | block/blk-sysfs.c | 1 |
6 files changed, 33 insertions, 28 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 24886b69690f..acdca6536562 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | #include "blk.h" | 41 | #include "blk.h" |
42 | #include "blk-mq.h" | 42 | #include "blk-mq.h" |
43 | #include "blk-mq-debugfs.h" | ||
43 | #include "blk-mq-sched.h" | 44 | #include "blk-mq-sched.h" |
44 | #include "blk-wbt.h" | 45 | #include "blk-wbt.h" |
45 | 46 | ||
diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c index 347fbb8e059c..1dc1847b5363 100644 --- a/block/blk-mq-debugfs.c +++ b/block/blk-mq-debugfs.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/blk-mq.h> | 21 | #include <linux/blk-mq.h> |
22 | #include "blk.h" | 22 | #include "blk.h" |
23 | #include "blk-mq.h" | 23 | #include "blk-mq.h" |
24 | #include "blk-mq-debugfs.h" | ||
24 | #include "blk-mq-tag.h" | 25 | #include "blk-mq-tag.h" |
25 | 26 | ||
26 | struct blk_mq_debugfs_attr { | 27 | struct blk_mq_debugfs_attr { |
diff --git a/block/blk-mq-debugfs.h b/block/blk-mq-debugfs.h new file mode 100644 index 000000000000..00b0f71d0ae9 --- /dev/null +++ b/block/blk-mq-debugfs.h | |||
@@ -0,0 +1,29 @@ | |||
1 | #ifndef INT_BLK_MQ_DEBUGFS_H | ||
2 | #define INT_BLK_MQ_DEBUGFS_H | ||
3 | |||
4 | #ifdef CONFIG_BLK_DEBUG_FS | ||
5 | int blk_mq_debugfs_register(struct request_queue *q); | ||
6 | void blk_mq_debugfs_unregister(struct request_queue *q); | ||
7 | int blk_mq_debugfs_register_mq(struct request_queue *q); | ||
8 | void blk_mq_debugfs_unregister_mq(struct request_queue *q); | ||
9 | #else | ||
10 | static inline int blk_mq_debugfs_register(struct request_queue *q) | ||
11 | { | ||
12 | return 0; | ||
13 | } | ||
14 | |||
15 | static inline void blk_mq_debugfs_unregister(struct request_queue *q) | ||
16 | { | ||
17 | } | ||
18 | |||
19 | static inline int blk_mq_debugfs_register_mq(struct request_queue *q) | ||
20 | { | ||
21 | return 0; | ||
22 | } | ||
23 | |||
24 | static inline void blk_mq_debugfs_unregister_mq(struct request_queue *q) | ||
25 | { | ||
26 | } | ||
27 | #endif | ||
28 | |||
29 | #endif | ||
diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c index ec0afdf765e3..71a237a90d43 100644 --- a/block/blk-mq-sysfs.c +++ b/block/blk-mq-sysfs.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/blk-mq.h> | 12 | #include <linux/blk-mq.h> |
13 | #include "blk-mq.h" | 13 | #include "blk-mq.h" |
14 | #include "blk-mq-debugfs.h" | ||
14 | #include "blk-mq-tag.h" | 15 | #include "blk-mq-tag.h" |
15 | 16 | ||
16 | static void blk_mq_sysfs_release(struct kobject *kobj) | 17 | static void blk_mq_sysfs_release(struct kobject *kobj) |
diff --git a/block/blk-mq.h b/block/blk-mq.h index 2814a14e529c..cc67b48e3551 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h | |||
@@ -83,34 +83,6 @@ extern int blk_mq_sysfs_register(struct request_queue *q); | |||
83 | extern void blk_mq_sysfs_unregister(struct request_queue *q); | 83 | extern void blk_mq_sysfs_unregister(struct request_queue *q); |
84 | extern void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx); | 84 | extern void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx); |
85 | 85 | ||
86 | /* | ||
87 | * debugfs helpers | ||
88 | */ | ||
89 | #ifdef CONFIG_BLK_DEBUG_FS | ||
90 | int blk_mq_debugfs_register(struct request_queue *q); | ||
91 | void blk_mq_debugfs_unregister(struct request_queue *q); | ||
92 | int blk_mq_debugfs_register_mq(struct request_queue *q); | ||
93 | void blk_mq_debugfs_unregister_mq(struct request_queue *q); | ||
94 | #else | ||
95 | static inline int blk_mq_debugfs_register(struct request_queue *q) | ||
96 | { | ||
97 | return 0; | ||
98 | } | ||
99 | |||
100 | static inline void blk_mq_debugfs_unregister(struct request_queue *q) | ||
101 | { | ||
102 | } | ||
103 | |||
104 | static inline int blk_mq_debugfs_register_mq(struct request_queue *q) | ||
105 | { | ||
106 | return 0; | ||
107 | } | ||
108 | |||
109 | static inline void blk_mq_debugfs_unregister_mq(struct request_queue *q) | ||
110 | { | ||
111 | } | ||
112 | #endif | ||
113 | |||
114 | extern void blk_mq_rq_timed_out(struct request *req, bool reserved); | 86 | extern void blk_mq_rq_timed_out(struct request *req, bool reserved); |
115 | 87 | ||
116 | void blk_mq_release(struct request_queue *q); | 88 | void blk_mq_release(struct request_queue *q); |
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 3f37813ccbaf..9995355121d7 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include "blk.h" | 14 | #include "blk.h" |
15 | #include "blk-mq.h" | 15 | #include "blk-mq.h" |
16 | #include "blk-mq-debugfs.h" | ||
16 | #include "blk-wbt.h" | 17 | #include "blk-wbt.h" |
17 | 18 | ||
18 | struct queue_sysfs_entry { | 19 | struct queue_sysfs_entry { |