diff options
author | Song Liu <songliubraving@fb.com> | 2020-09-01 00:27:23 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-09-12 00:41:30 +0200 |
commit | 7b26410b05f8c262688de8a689ba8e5d0c3cff01 (patch) | |
tree | 2e5f62110986ddd52f8fcce4c00f7d5fe2c466fb /include | |
parent | blk-mq: always allow reserved allocation in hctx_may_queue (diff) | |
download | linux-7b26410b05f8c262688de8a689ba8e5d0c3cff01.tar.xz linux-7b26410b05f8c262688de8a689ba8e5d0c3cff01.zip |
block: introduce part_[begin|end]_io_acct
These functions can be used to enable iostat for partitions on devices
like md, bcache.
Signed-off-by: Song Liu <songliubraving@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 37ec5a73d027..5bd96fbab9b4 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1933,6 +1933,11 @@ unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors, void disk_end_io_acct(struct gendisk *disk, unsigned int op, unsigned long start_time); +unsigned long part_start_io_acct(struct gendisk *disk, struct hd_struct **part, + struct bio *bio); +void part_end_io_acct(struct hd_struct *part, struct bio *bio, + unsigned long start_time); + /** * bio_start_io_acct - start I/O accounting for bio based drivers * @bio: bio to start account for |