Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115486
b: refs/heads/master
c: 80a4b58
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe committed Oct 17, 2008
1 parent 31e88c3 commit d2bd7f7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ee2e992cc28553f6c4dd1ab5483c8733c393626b
refs/heads/master: 80a4b58e36b63d7b0b592beb1bd6410aadeeb63c
19 changes: 17 additions & 2 deletions trunk/block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ EXPORT_SYMBOL(blk_unplug);

static void blk_invoke_request_fn(struct request_queue *q)
{
if (unlikely(blk_queue_stopped(q)))
return;

/*
* one level of recursion is ok and is much faster than kicking
* the unplug handling
Expand Down Expand Up @@ -399,8 +402,13 @@ void blk_sync_queue(struct request_queue *q)
EXPORT_SYMBOL(blk_sync_queue);

/**
* blk_run_queue - run a single device queue
* __blk_run_queue - run a single device queue
* @q: The queue to run
*
* Description:
* See @blk_run_queue. This variant must be called with the queue lock
* held and interrupts disabled.
*
*/
void __blk_run_queue(struct request_queue *q)
{
Expand All @@ -418,6 +426,12 @@ EXPORT_SYMBOL(__blk_run_queue);
/**
* blk_run_queue - run a single device queue
* @q: The queue to run
*
* Description:
* Invoke request handling on this queue, if it has pending work to do.
* May be used to restart queueing when a request has completed. Also
* See @blk_start_queueing.
*
*/
void blk_run_queue(struct request_queue *q)
{
Expand Down Expand Up @@ -884,7 +898,8 @@ EXPORT_SYMBOL(blk_get_request);
*
* This is basically a helper to remove the need to know whether a queue
* is plugged or not if someone just wants to initiate dispatch of requests
* for this queue.
* for this queue. Should be used to start queueing on a device outside
* of ->request_fn() context. Also see @blk_run_queue.
*
* The queue lock must be held with interrupts disabled.
*/
Expand Down
7 changes: 3 additions & 4 deletions trunk/block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ void elv_insert(struct request_queue *q, struct request *rq, int where)
* processing.
*/
blk_remove_plug(q);
q->request_fn(q);
blk_start_queueing(q);
break;

case ELEVATOR_INSERT_SORT:
Expand Down Expand Up @@ -950,7 +950,7 @@ void elv_completed_request(struct request_queue *q, struct request *rq)
blk_ordered_cur_seq(q) == QUEUE_ORDSEQ_DRAIN &&
blk_ordered_req_seq(first_rq) > QUEUE_ORDSEQ_DRAIN) {
blk_ordered_complete_seq(q, QUEUE_ORDSEQ_DRAIN, 0);
q->request_fn(q);
blk_start_queueing(q);
}
}
}
Expand Down Expand Up @@ -1109,8 +1109,7 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e)
elv_drain_elevator(q);

while (q->rq.elvpriv) {
blk_remove_plug(q);
q->request_fn(q);
blk_start_queueing(q);
spin_unlock_irq(q->queue_lock);
msleep(10);
spin_lock_irq(q->queue_lock);
Expand Down

0 comments on commit d2bd7f7

Please sign in to comment.