diff options
author | Omar Sandoval <osandov@fb.com> | 2017-01-31 23:53:20 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-02-02 18:20:16 +0100 |
commit | 18fbda91c6370d520278db9ee1e768b59ef5c4ab (patch) | |
tree | 24a7e92d1dd90533dd783ea87abf13cf55284049 /block/blk-core.c | |
parent | blktrace: make do_blk_trace_setup() static (diff) | |
download | linux-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-core.c')
-rw-r--r-- | block/blk-core.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index a5726e01f839..76c42f559df8 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -33,6 +33,7 @@ #include <linux/ratelimit.h> #include <linux/pm_runtime.h> #include <linux/blk-cgroup.h> +#include <linux/debugfs.h> #define CREATE_TRACE_POINTS #include <trace/events/block.h> @@ -42,6 +43,10 @@ #include "blk-mq-sched.h" #include "blk-wbt.h" +#ifdef CONFIG_DEBUG_FS +struct dentry *blk_debugfs_root; +#endif + EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_remap); EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_remap); EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_complete); @@ -3441,5 +3446,9 @@ int __init blk_dev_init(void) blk_requestq_cachep = kmem_cache_create("request_queue", sizeof(struct request_queue), 0, SLAB_PANIC, NULL); +#ifdef CONFIG_DEBUG_FS + blk_debugfs_root = debugfs_create_dir("block", NULL); +#endif + return 0; } |