diff mbox series

block: remove redundant passthrough check in blk_mq_need_time_stamp()

Message ID 2aae722e-e815-4fe9-8321-86b062f517b3@kernel.dk (mailing list archive)
State New, archived
Headers show
Series block: remove redundant passthrough check in blk_mq_need_time_stamp() | expand

Commit Message

Jens Axboe Oct. 2, 2024, 8:11 p.m. UTC
Simply checking the rq_flags is enough to determine if accounting is
being done for this request.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

---

Comments

Keith Busch Oct. 2, 2024, 8:14 p.m. UTC | #1
On Wed, Oct 02, 2024 at 02:11:07PM -0600, Jens Axboe wrote:
> Simply checking the rq_flags is enough to determine if accounting is
> being done for this request.

Yep, rq_flags do not get set if request is a passthrough, so checking
both is redundant.

Reviewed-by: Keith Busch <kbusch@kernel.org>
Anuj gupta Oct. 3, 2024, 8:20 a.m. UTC | #2
Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
diff mbox series

Patch

diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index 4fecf46ef681..59e9adf815a4 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -857,12 +857,6 @@  void blk_mq_end_request_batch(struct io_comp_batch *ib);
  */
 static inline bool blk_mq_need_time_stamp(struct request *rq)
 {
-	/*
-	 * passthrough io doesn't use iostat accounting, cgroup stats
-	 * and io scheduler functionalities.
-	 */
-	if (blk_rq_is_passthrough(rq))
-		return false;
 	return (rq->rq_flags & (RQF_IO_STAT | RQF_STATS | RQF_USE_SCHED));
 }