summaryrefslogtreecommitdiffstats
path: root/block/blk-mq-debugfs.c
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2017-01-31 23:53:20 +0100
committerJens Axboe <axboe@fb.com>2017-02-02 18:20:16 +0100
commit18fbda91c6370d520278db9ee1e768b59ef5c4ab (patch)
tree24a7e92d1dd90533dd783ea87abf13cf55284049 /block/blk-mq-debugfs.c
parentblktrace: make do_blk_trace_setup() static (diff)
downloadlinux-18fbda91c6370d520278db9ee1e768b59ef5c4ab.tar.xz
linux-18fbda91c6370d520278db9ee1e768b59ef5c4ab.zip
block: use same block debugfs directory for blk-mq and blktrace
When I added the blk-mq debugging information to debugfs, I didn't notice that blktrace also creates a "block" directory in debugfs. Make them use the same dentry, now created in the core block code. Based on a patch from Jens. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq-debugfs.c')
-rw-r--r--block/blk-mq-debugfs.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index 1077008690b2..f6d917977b33 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -19,6 +19,7 @@
#include <linux/debugfs.h>
#include <linux/blk-mq.h>
+#include "blk.h"
#include "blk-mq.h"
#include "blk-mq-tag.h"
@@ -28,8 +29,6 @@ struct blk_mq_debugfs_attr {
const struct file_operations *fops;
};
-static struct dentry *block_debugfs_root;
-
static int blk_mq_debugfs_seq_open(struct inode *inode, struct file *file,
const struct seq_operations *ops)
{
@@ -665,10 +664,10 @@ static const struct blk_mq_debugfs_attr blk_mq_debugfs_ctx_attrs[] = {
int blk_mq_debugfs_register(struct request_queue *q, const char *name)
{
- if (!block_debugfs_root)
+ if (!blk_debugfs_root)
return -ENOENT;
- q->debugfs_dir = debugfs_create_dir(name, block_debugfs_root);
+ q->debugfs_dir = debugfs_create_dir(name, blk_debugfs_root);
if (!q->debugfs_dir)
goto err;
@@ -771,8 +770,3 @@ void blk_mq_debugfs_unregister_hctxs(struct request_queue *q)
debugfs_remove_recursive(q->mq_debugfs_dir);
q->mq_debugfs_dir = NULL;
}
-
-void blk_mq_debugfs_init(void)
-{
- block_debugfs_root = debugfs_create_dir("block", NULL);
-}