From mboxrd@z Thu Jan 1 00:00:00 1970 From: logang@deltatee.com (Logan Gunthorpe) Date: Thu, 1 Aug 2019 17:45:12 -0600 Subject: [PATCH v7 13/14] block: call blk_account_io_start() in blk_execute_rq_nowait() In-Reply-To: <20190801234514.7941-1-logang@deltatee.com> References: <20190801234514.7941-1-logang@deltatee.com> Message-ID: <20190801234514.7941-14-logang@deltatee.com> All existing users of blk_execute_rq[_nowait]() are for passthrough commands and will thus be rejected by blk_do_io_stat(). This allows passthrough requests to opt-in to IO accounting by setting RQF_IO_STAT. Signed-off-by: Logan Gunthorpe --- block/blk-exec.c | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.20.1