]> git.baikalelectronics.ru Git - kernel.git/commit
block: avoid duplicate calls to get_part() in disk stat code
authorJens Axboe <jens.axboe@oracle.com>
Wed, 7 May 2008 08:15:46 +0000 (10:15 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 7 May 2008 08:15:46 +0000 (10:15 +0200)
commite24c9c357c7d10f3300684e00713eb2d4b358c5e
tree08cf04c696bf0facb083bbfbdd867e5949c5fa14
parent1c10e051f3b20ad9b7260bc73d0f72cda57eeef3
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: Jens Axboe <jens.axboe@oracle.com>
block/blk-core.c
drivers/block/aoe/aoecmd.c
include/linux/genhd.h