• Omar Sandoval's avatar
    blk-mq: count allocated but not started requests in iostats inflight · 6131837b
    Omar Sandoval authored
    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: f299b7c7 ("blk-mq: provide internal in-flight variant")
    Signed-off-by: default avatarOmar Sandoval <osandov@fb.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    6131837b
blk-mq.c 77.2 KB