summaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2017-06-26 08:15:27 -0600
committerJens Axboe <axboe@kernel.dk>2017-06-27 12:05:31 -0600
commitf793dfd3f39a3dc50468b06498606b3a906f42f1 (patch)
tree5bce7522f30a29ec7931e6b1cdc5d37f9e60b13e /include/linux/blkdev.h
parentcb6934f8ea1a595902ca37e250e0917d4dd7b2a7 (diff)
downloadblackbird-op-linux-f793dfd3f39a3dc50468b06498606b3a906f42f1.tar.gz
blackbird-op-linux-f793dfd3f39a3dc50468b06498606b3a906f42f1.zip
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>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 0eebd3bcfd85..e1e289ab66b9 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -596,6 +596,9 @@ struct request_queue {
void *rq_alloc_data;
struct work_struct release_work;
+
+#define BLK_MAX_WRITE_HINTS 5
+ u64 write_hints[BLK_MAX_WRITE_HINTS];
};
#define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */
OpenPOWER on IntegriCloud