]> 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)
commitebcd093b420d87a8fd6d57dc30cf750769bb72bc
treecaf71e9d071972f71fd778b7639d8ca20b732982
parent8bc67955228d30a1ce8ddfece432a00ee616bf41
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