block: remove redundant passthrough check in blk_mq_need_time_stamp()
Jens Axboe
maintainerPATCH 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.
Signed-off-by Jens Axboe <[email protected]>
---
include/linux/blk-mq.h +0 -6
@@ -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
Quoted 2 lines · Jens Axboe
Simply checking the
rq_flagsis 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 <[email protected]>
Reviewed-by Anuj Gupta <[email protected]>