]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - drivers/md/md.c
block: use ->bi_bdev for bio based I/O accounting
authorChristoph Hellwig <hch@lst.de>
Sun, 24 Jan 2021 10:02:37 +0000 (11:02 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 01:17:20 +0000 (18:17 -0700)
commit99dfc43ecbf67f12a06512918aaba61d55863efc
treeb31f16b3272c8bef4c90c73e7383de74a64aee3c
parent30c5d3456c272f0de0d7e7eb9fc355fa64a5f649
block: use ->bi_bdev for bio based I/O accounting

Rework the I/O accounting for bio based drivers to use ->bi_bdev.  This
means all drivers can now simply use bio_start_io_acct to start
accounting, and it will take partitions into account automatically.  To
end I/O account either bio_end_io_acct can be used if the driver never
remaps I/O to a different device, or bio_end_io_acct_remapped if the
driver did remap the I/O.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
drivers/md/bcache/request.c
drivers/md/md.c
include/linux/blkdev.h