]> git.baikalelectronics.ru Git - kernel.git/commit
block: add a blk_account_io_merge_bio helper
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Wed, 27 May 2020 05:24:16 +0000 (07:24 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 27 May 2020 11:21:23 +0000 (05:21 -0600)
commitf050c49d2e977096ca263d0366ae593d1326d83e
treeff8c29b292e97a0ae4ceaa79e37bdb0bb4f8c8d7
parente6ad2c0cd6b9515f2d7856eb1bb41f4225740f4b
block: add a blk_account_io_merge_bio helper

Move the non-"new_io" branch of blk_account_io_start() into separate
function.  Fix merge accounting for discards (they were counted as write
merges).

The new blk_account_io_merge_bio() doesn't call update_io_ticks() unlike
blk_account_io_start(), as there is no reason for that.

[hch: rebased]

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
block/blk-exec.c
block/blk-mq.c
block/blk.h