]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: count allocated but not started requests in iostats inflight
authorOmar Sandoval <osandov@fb.com>
Thu, 26 Apr 2018 07:21:58 +0000 (00:21 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 26 Apr 2018 15:02:00 +0000 (09:02 -0600)
commit35c062a3831066d4d4b89b2ed91675f6d5f15bc1
treec6b85c5075746a1369e95593f1d93769b3938e5d
parentf4356f0f108a22f4e56966214c43e2f6332dc44a
blk-mq: count allocated but not started requests in iostats inflight

In the legacy block case, we increment the counter right after we
allocate the request, not when the driver handles it. In both the legacy
and blk-mq cases, part_inc_in_flight() is called from
blk_account_io_start() right after we've allocated the request. blk-mq
only considers requests started requests as inflight, but this is
inconsistent with the legacy definition and the intention in the code.
This removes the started condition and instead counts all allocated
requests.

Fixes: 2baa05d92614 ("blk-mq: provide internal in-flight variant")
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c