block: blk-mq: Remove blk_mq_sched_started_request and started_request
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>
Tue, 23 Jul 2019 03:27:41 +0000 (00:27 -0300)
committerJens Axboe <axboe@kernel.dk>
Tue, 23 Jul 2019 13:25:09 +0000 (07:25 -0600)
blk_mq_sched_completed_request is a function that checks if the elevator
related to the request has started_request implemented, but currently, none of
the available IO schedulers implement started_request, so remove both.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-sched.h
block/blk-mq.c
include/linux/elevator.h

index cf22ab00fefb68cdc9efda7d9dcad8329307a262..126021fc3a11f9308a5fe0745ba2a6f9f1ee2ee5 100644 (file)
@@ -61,15 +61,6 @@ static inline void blk_mq_sched_completed_request(struct request *rq, u64 now)
                e->type->ops.completed_request(rq, now);
 }
 
-static inline void blk_mq_sched_started_request(struct request *rq)
-{
-       struct request_queue *q = rq->q;
-       struct elevator_queue *e = q->elevator;
-
-       if (e && e->type->ops.started_request)
-               e->type->ops.started_request(rq);
-}
-
 static inline void blk_mq_sched_requeue_request(struct request *rq)
 {
        struct request_queue *q = rq->q;
index 2bc2c070566059df81cfcec913b91ef3822227cf..f78d3287dd823f6b431c87eec675580c1e987d55 100644 (file)
@@ -669,8 +669,6 @@ void blk_mq_start_request(struct request *rq)
 {
        struct request_queue *q = rq->q;
 
-       blk_mq_sched_started_request(rq);
-
        trace_block_rq_issue(q, rq);
 
        if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags)) {
index 17cd0078377cae91dc86d63541b1bd6b87141b0a..1dd014c9c87b57ade5d86311635d24aa8e78e2c1 100644 (file)
@@ -45,7 +45,6 @@ struct elevator_mq_ops {
        struct request *(*dispatch_request)(struct blk_mq_hw_ctx *);
        bool (*has_work)(struct blk_mq_hw_ctx *);
        void (*completed_request)(struct request *, u64);
-       void (*started_request)(struct request *);
        void (*requeue_request)(struct request *);
        struct request *(*former_request)(struct request_queue *, struct request *);
        struct request *(*next_request)(struct request_queue *, struct request *);