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>
Tue, 27 Jun 2017 18:05:31 +0000 (12:05 -0600)
commitf793dfd3f39a3dc50468b06498606b3a906f42f1
tree5bce7522f30a29ec7931e6b1cdc5d37f9e60b13e
parentcb6934f8ea1a595902ca37e250e0917d4dd7b2a7
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