]> git.proxmox.com Git - mirror_ubuntu-artful-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)
commitf57de23ac9019ea84c548a1637d5562ef07a8f7e
treecaf71e9d071972f71fd778b7639d8ca20b732982
parent88aabbd7e7ace77fb3fbf06d22dd3cc0bfc0ca79
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