]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq-debugfs: get rid of a bunch of boilerplate
authorOmar Sandoval <osandov@fb.com>
Thu, 4 May 2017 07:31:28 +0000 (00:31 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 4 May 2017 14:23:35 +0000 (08:23 -0600)
commit62e928c27deb19af2dd87a8261bff97b11ff83ea
treecaf71e9d071972f71fd778b7639d8ca20b732982
parent7f11a571a07d95abb2842d3519f4075d8781d16f
blk-mq-debugfs: get rid of a bunch of boilerplate

A large part of blk-mq-debugfs.c is file_operations and seq_file
boilerplate. This sucks as is but will suck even more when schedulers
can define their own debugfs entries. Factor it all out into a single
blk_mq_debugfs_fops which multiplexes as needed. We store the
request_queue, blk_mq_hw_ctx, or blk_mq_ctx in the parent directory
dentry, which is kind of hacky, but it works.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq-debugfs.c