]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc19dcb4c548210bf40bd7e26f8960149a615d722
treeb31f16b3272c8bef4c90c73e7383de74a64aee3c
parent674b93bd23a2d0fecb1862af72f7d8ac7ec7d6b4
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