Commit 60abdcb3 authored by Jens Axboe's avatar Jens Axboe

[PATCH] ide io scheduler thing

IDE must use blk_queue_empty() and not do a list_empty() on the
(potentially only) dispatch queue.  This took quite a while to find
while debugging a new io scheduler...
parent 872aa4a8
...@@ -980,7 +980,7 @@ static inline ide_drive_t *choose_drive (ide_hwgroup_t *hwgroup) ...@@ -980,7 +980,7 @@ static inline ide_drive_t *choose_drive (ide_hwgroup_t *hwgroup)
best = NULL; best = NULL;
drive = hwgroup->drive; drive = hwgroup->drive;
do { do {
if (!list_empty(&drive->queue.queue_head) && (!drive->sleep || time_after_eq(jiffies, drive->sleep))) { if (!blk_queue_empty(&drive->queue) && (!drive->sleep || time_after_eq(jiffies, drive->sleep))) {
if (!best if (!best
|| (drive->sleep && (!best->sleep || 0 < (signed long)(best->sleep - drive->sleep))) || (drive->sleep && (!best->sleep || 0 < (signed long)(best->sleep - drive->sleep)))
|| (!best->sleep && 0 < (signed long)(WAKEUP(best) - WAKEUP(drive)))) || (!best->sleep && 0 < (signed long)(WAKEUP(best) - WAKEUP(drive))))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment