Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10194
b: refs/heads/master
c: 64521d1
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe authored and Jens Axboe committed Oct 28, 2005
1 parent 4a34e82 commit 3f05c00
Show file tree
Hide file tree
Showing 4 changed files with 7 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: cb98fc8bb9c141009e2bda99c0db39d387e142cf
refs/heads/master: 64521d1a3ba7cc7fe4ab5640da83d88144f05340
8 changes: 4 additions & 4 deletions trunk/drivers/block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,14 +671,14 @@ static void elevator_switch(request_queue_t *q, struct elevator_type *new_e)
*/
spin_lock_irq(q->queue_lock);

set_bit(QUEUE_FLAG_BYPASS, &q->queue_flags);
set_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags);

while (q->elevator->ops->elevator_dispatch_fn(q, 1))
;

while (q->rq.elvpriv) {
spin_unlock_irq(q->queue_lock);
msleep(100);
msleep(10);
spin_lock_irq(q->queue_lock);
}

Expand All @@ -703,7 +703,7 @@ static void elevator_switch(request_queue_t *q, struct elevator_type *new_e)
* finally exit old elevator and turn off BYPASS.
*/
elevator_exit(old_elevator);
clear_bit(QUEUE_FLAG_BYPASS, &q->queue_flags);
clear_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags);
return;

fail_register:
Expand All @@ -716,7 +716,7 @@ static void elevator_switch(request_queue_t *q, struct elevator_type *new_e)
fail:
q->elevator = old_elevator;
elv_register_queue(q);
clear_bit(QUEUE_FLAG_BYPASS, &q->queue_flags);
clear_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags);
kfree(e);
error:
elevator_put(new_e);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1940,7 +1940,7 @@ static struct request *get_request(request_queue_t *q, int rw, struct bio *bio,
if (rl->count[rw] >= queue_congestion_on_threshold(q))
set_queue_congested(q, rw);

priv = !test_bit(QUEUE_FLAG_BYPASS, &q->queue_flags);
priv = !test_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags);
if (priv)
rl->elvpriv++;

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ enum {
#define QUEUE_FLAG_DEAD 5 /* queue being torn down */
#define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */
#define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */
#define QUEUE_FLAG_BYPASS 8 /* don't use elevator, just do FIFO */
#define QUEUE_FLAG_ELVSWITCH 8 /* don't use elevator, just do FIFO */
#define QUEUE_FLAG_FLUSH 9 /* doing barrier flush sequence */

#define blk_queue_plugged(q) test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags)
Expand Down

0 comments on commit 3f05c00

Please sign in to comment.