1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-06 13:09:50 +00:00

- Fix insertions of bios which represent data earlier than anything else

in the queue.  The insertion sort assumed this had already been taken
   care of.

Spotted by:	Antoine Brodin
Approved by:	re (scottl)
This commit is contained in:
Jeff Roberson 2005-06-15 23:32:07 +00:00
parent c3f967ce8d
commit bdcd9f26b0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147406

View File

@ -182,15 +182,12 @@ bioq_disksort(bioq, bp)
}
} else
bq = TAILQ_FIRST(&bioq->queue);
if (bp->bio_offset < bq->bio_offset) {
TAILQ_INSERT_BEFORE(bq, bp, bio_queue);
return;
}
/* Insertion sort */
while ((bn = TAILQ_NEXT(bq, bio_queue)) != NULL) {
/*
* We want to go after the current request if it is the end
* of the first request list, or if the next request is a
* larger cylinder than our request.
*/
if (bp->bio_offset < bn->bio_offset)
break;
bq = bn;