Skip to content

Commit

Permalink
[BLOCK] elevator: elv_latter/former_request update
Browse files Browse the repository at this point in the history
With generic dispatch queue update, implicit former/latter request
handling using rq->queuelist.prev/next doesn't work as expected
anymore.  Also, the only iosched dependent on this feature was
noop-iosched and it has been reimplemented to have its own
latter/former methods.  This patch removes implicit former/latter
handling.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Nov 12, 2005
1 parent 5a7c47e commit 3beb207
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,33 +541,19 @@ int elv_queue_empty(request_queue_t *q)

struct request *elv_latter_request(request_queue_t *q, struct request *rq)
{
struct list_head *next;

elevator_t *e = q->elevator;

if (e->ops->elevator_latter_req_fn)
return e->ops->elevator_latter_req_fn(q, rq);

next = rq->queuelist.next;
if (next != &q->queue_head && next != &rq->queuelist)
return list_entry_rq(next);

return NULL;
}

struct request *elv_former_request(request_queue_t *q, struct request *rq)
{
struct list_head *prev;

elevator_t *e = q->elevator;

if (e->ops->elevator_former_req_fn)
return e->ops->elevator_former_req_fn(q, rq);

prev = rq->queuelist.prev;
if (prev != &q->queue_head && prev != &rq->queuelist)
return list_entry_rq(prev);

return NULL;
}

Expand Down

0 comments on commit 3beb207

Please sign in to comment.