summaryrefslogtreecommitdiff
path: root/block/blk.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-10-02 22:19:48 +0300
committerJens Axboe <axboe@kernel.dk>2024-10-22 17:14:56 +0300
commit8933805623fafc0e276ddd8110672068c5bd9763 (patch)
treeb3d348a7f7bfb5d79ed31d9a925b97eb730b49a7 /block/blk.h
parent42f7652d3eb527d03665b09edac47f85fb600924 (diff)
downloadlinux-8933805623fafc0e276ddd8110672068c5bd9763.tar.xz
block: move iostat check into blk_acount_io_start()
Rather than have blk_do_io_stat() check for both RQF_IO_STAT and whether the request is a passthrough requests every time, move both of those checks into blk_account_io_start(). Then blk_do_io_stat() can be reduced to just checking for RQF_IO_STAT. Reviewed-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Anuj Gupta <anuj20.g@samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk.h b/block/blk.h
index c718e4291db0..84178e535533 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -413,7 +413,7 @@ int blk_dev_init(void);
*/
static inline bool blk_do_io_stat(struct request *rq)
{
- return (rq->rq_flags & RQF_IO_STAT) && !blk_rq_is_passthrough(rq);
+ return rq->rq_flags & RQF_IO_STAT;
}
void update_io_ticks(struct block_device *part, unsigned long now, bool end);