From 48d9b0d43105e0da2b7c135eedd24e51234fb5e4 Mon Sep 17 00:00:00 2001 From: Logan Gunthorpe Date: Thu, 10 Oct 2019 17:36:26 -0600 Subject: block: account statistics for passthrough requests Presently, passthrough requests are not accounted for because blk_do_io_stat() expressly rejects them. Based on some digging in the history, this doesn't seem like a concious decision but one that evolved from the change from blk_fs_request() to blk_rq_is_passthrough(). To support this, call blk_account_io_start() in blk_execute_rq_nowait() and remove the passthrough check in blk_do_io_stat(). Link: https://lore.kernel.org/linux-block/20191010100526.GA27209@lst.de/ Signed-off-by: Logan Gunthorpe Cc: Jens Axboe Cc: Christoph Hellwig Signed-off-by: Jens Axboe --- block/blk-exec.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'block/blk-exec.c') diff --git a/block/blk-exec.c b/block/blk-exec.c index 1db44ca0f4a6..e20a852ae432 100644 --- a/block/blk-exec.c +++ b/block/blk-exec.c @@ -55,6 +55,8 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk, rq->rq_disk = bd_disk; rq->end_io = done; + blk_account_io_start(rq, true); + /* * don't check dying flag for MQ because the request won't * be reused after dying flag is set -- cgit v1.2.3