blk-mq: expose write hints through debugfs
authorJens Axboe <axboe@kernel.dk>
Mon, 26 Jun 2017 14:15:27 +0000 (08:15 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Jun 2017 15:31:37 +0000 (09:31 -0600)
commit6c39c81033afb74925710e7ace8f1b2f78ff2d11
tree5f1af254eba9a29da9edd0a57d23cbdae74c4c87
parent2c5e34ad7267745bf6a9d87e654d1e364b24e4a0
blk-mq: expose write hints through debugfs

Useful to verify that things are working the way they should.
Reading the file will return number of kb written with each
write hint. Writing the file will reset the statistics. No care
is taken to ensure that we don't race on updates.

Drivers will write to q->write_hints[] if they handle a given
write hint.

Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-debugfs.c
include/linux/blkdev.h