Skip to content
Commit 28f13702 authored by Jens Axboe's avatar Jens Axboe
Browse files

block: avoid duplicate calls to get_part() in disk stat code



get_part() is fairly expensive, as it O(N) loops over partitions
to find the right one. In lots of normal IO paths we end up looking
up the partition twice, to make matters even worse. Change the
stat add code to accept a passed in partition instead.

Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 6d63c275
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment