Commit 62d6c949 authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe

blk-mq-debugfs: Rename functions for registering and unregistering the mq directory

Since the blk_mq_debugfs_*register_hctxs() functions register and
unregister all attributes under the "mq" directory, rename these
into blk_mq_debugfs_*register_mq().
Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 4c9e4019
...@@ -795,7 +795,7 @@ int blk_mq_debugfs_register(struct request_queue *q) ...@@ -795,7 +795,7 @@ int blk_mq_debugfs_register(struct request_queue *q)
if (!q->debugfs_dir) if (!q->debugfs_dir)
goto err; goto err;
if (blk_mq_debugfs_register_hctxs(q)) if (blk_mq_debugfs_register_mq(q))
goto err; goto err;
return 0; return 0;
...@@ -865,7 +865,7 @@ static int blk_mq_debugfs_register_hctx(struct request_queue *q, ...@@ -865,7 +865,7 @@ static int blk_mq_debugfs_register_hctx(struct request_queue *q,
return 0; return 0;
} }
int blk_mq_debugfs_register_hctxs(struct request_queue *q) int blk_mq_debugfs_register_mq(struct request_queue *q)
{ {
struct blk_mq_hw_ctx *hctx; struct blk_mq_hw_ctx *hctx;
int i; int i;
...@@ -891,11 +891,11 @@ int blk_mq_debugfs_register_hctxs(struct request_queue *q) ...@@ -891,11 +891,11 @@ int blk_mq_debugfs_register_hctxs(struct request_queue *q)
return 0; return 0;
err: err:
blk_mq_debugfs_unregister_hctxs(q); blk_mq_debugfs_unregister_mq(q);
return -ENOMEM; return -ENOMEM;
} }
void blk_mq_debugfs_unregister_hctxs(struct request_queue *q) void blk_mq_debugfs_unregister_mq(struct request_queue *q)
{ {
debugfs_remove_recursive(q->mq_debugfs_dir); debugfs_remove_recursive(q->mq_debugfs_dir);
q->mq_debugfs_dir = NULL; q->mq_debugfs_dir = NULL;
......
...@@ -258,7 +258,7 @@ static void __blk_mq_unregister_dev(struct device *dev, struct request_queue *q) ...@@ -258,7 +258,7 @@ static void __blk_mq_unregister_dev(struct device *dev, struct request_queue *q)
queue_for_each_hw_ctx(q, hctx, i) queue_for_each_hw_ctx(q, hctx, i)
blk_mq_unregister_hctx(hctx); blk_mq_unregister_hctx(hctx);
blk_mq_debugfs_unregister_hctxs(q); blk_mq_debugfs_unregister_mq(q);
kobject_uevent(&q->mq_kobj, KOBJ_REMOVE); kobject_uevent(&q->mq_kobj, KOBJ_REMOVE);
kobject_del(&q->mq_kobj); kobject_del(&q->mq_kobj);
...@@ -356,7 +356,7 @@ void blk_mq_sysfs_unregister(struct request_queue *q) ...@@ -356,7 +356,7 @@ void blk_mq_sysfs_unregister(struct request_queue *q)
if (!q->mq_sysfs_init_done) if (!q->mq_sysfs_init_done)
goto unlock; goto unlock;
blk_mq_debugfs_unregister_hctxs(q); blk_mq_debugfs_unregister_mq(q);
queue_for_each_hw_ctx(q, hctx, i) queue_for_each_hw_ctx(q, hctx, i)
blk_mq_unregister_hctx(hctx); blk_mq_unregister_hctx(hctx);
...@@ -374,7 +374,7 @@ int blk_mq_sysfs_register(struct request_queue *q) ...@@ -374,7 +374,7 @@ int blk_mq_sysfs_register(struct request_queue *q)
if (!q->mq_sysfs_init_done) if (!q->mq_sysfs_init_done)
goto unlock; goto unlock;
blk_mq_debugfs_register_hctxs(q); blk_mq_debugfs_register_mq(q);
queue_for_each_hw_ctx(q, hctx, i) { queue_for_each_hw_ctx(q, hctx, i) {
ret = blk_mq_register_hctx(hctx); ret = blk_mq_register_hctx(hctx);
......
...@@ -89,8 +89,8 @@ extern void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx); ...@@ -89,8 +89,8 @@ extern void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx);
#ifdef CONFIG_BLK_DEBUG_FS #ifdef CONFIG_BLK_DEBUG_FS
int blk_mq_debugfs_register(struct request_queue *q); int blk_mq_debugfs_register(struct request_queue *q);
void blk_mq_debugfs_unregister(struct request_queue *q); void blk_mq_debugfs_unregister(struct request_queue *q);
int blk_mq_debugfs_register_hctxs(struct request_queue *q); int blk_mq_debugfs_register_mq(struct request_queue *q);
void blk_mq_debugfs_unregister_hctxs(struct request_queue *q); void blk_mq_debugfs_unregister_mq(struct request_queue *q);
#else #else
static inline int blk_mq_debugfs_register(struct request_queue *q) static inline int blk_mq_debugfs_register(struct request_queue *q)
{ {
...@@ -101,12 +101,12 @@ static inline void blk_mq_debugfs_unregister(struct request_queue *q) ...@@ -101,12 +101,12 @@ static inline void blk_mq_debugfs_unregister(struct request_queue *q)
{ {
} }
static inline int blk_mq_debugfs_register_hctxs(struct request_queue *q) static inline int blk_mq_debugfs_register_mq(struct request_queue *q)
{ {
return 0; return 0;
} }
static inline void blk_mq_debugfs_unregister_hctxs(struct request_queue *q) static inline void blk_mq_debugfs_unregister_mq(struct request_queue *q)
{ {
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment