summaryrefslogtreecommitdiff
path: root/block/blk-mq-tag.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2021-05-11 23:22:33 +0800
committerJens Axboe <axboe@kernel.dk>2021-05-24 06:47:21 -0600
commit84da7acc3ba53af26f15c4b0ada446127b7a7836 (patch)
treeb9b3f6491319d187f8a66f5fcaff30d6941c818a /block/blk-mq-tag.c
parent8c390ff910c5500fc16cca6f90ac2a60c7c84979 (diff)
block: avoid double io accounting for flush request
For flush request, rq->end_io() may be called two times, one is from timeout handling(blk_mq_check_expired()), another is from normal completion(__blk_mq_end_request()). Move blk_account_io_flush() after flush_rq->ref drops to zero, so io accounting can be done just once for flush request. Fixes: b68663186577 ("block: add iostat counters for flush requests") Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: John Garry <john.garry@huawei.com> Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20210511152236.763464-2-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-tag.c')
0 files changed, 0 insertions, 0 deletions