Skip to contentSkip to conversation

block: remove redundant passthrough check in blk_mq_need_time_stamp()

PATCH In review Jens Axboe 3 participants 3 messages Oct 2, 2024 – Oct 3, 2024 Block layer

lore
Share & tools
lore

Jens Axboe

author maintainer
#0 lore raw

PATCH 1/1 block: remove redundant passthrough check in blk_mq_need_time_stamp()

Simply checking the rq_flags is enough to determine if accounting is being done for this request.

---

include/linux/blk-mq.h +0 -6
index 4fecf46ef681..59e9adf815a4 100644
@@ -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));
 }
 
Signature · 1 line
Jens Axboe
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Jens Axboe

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.