Skip to content

Commit

Permalink
block: blk-mq: Remove blk_mq_sched_started_request and started_request
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
marcosps authored and axboe committed Jul 23, 2019
1 parent 5d9e06d commit 327fe1d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
9 changes: 0 additions & 9 deletions block/blk-mq-sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
1 change: 0 additions & 1 deletion include/linux/elevator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down

0 comments on commit 327fe1d

Please sign in to comment.