diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-04-18 13:25:19 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-04-18 13:25:19 +0000 |
commit | 11f8a0ca772467de4a9bdad194f098900efbcf23 (patch) | |
tree | 4621a4eb712e368ca0765131bed186629e18bb20 /sys/kern | |
parent | 0991b97a303bfb08fd0ef1de2cd5dd332ef8f6e5 (diff) | |
download | src-11f8a0ca772467de4a9bdad194f098900efbcf23.tar.gz src-11f8a0ca772467de4a9bdad194f098900efbcf23.zip |
Retire bufqdisksort(), all drivers use bioqdisksort now.
Notes
Notes:
svn path=/head/; revision=59363
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/subr_disklabel.c | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/sys/kern/subr_disklabel.c b/sys/kern/subr_disklabel.c index 8a1fc0bea04e..f3f7b981678e 100644 --- a/sys/kern/subr_disklabel.c +++ b/sys/kern/subr_disklabel.c @@ -63,104 +63,6 @@ */ void -bufqdisksort(bufq, bp) - struct buf_queue_head *bufq; - struct buf *bp; -{ - struct buf *bq; - struct buf *bn; - struct buf *be; - - be = TAILQ_LAST(&bufq->queue, buf_queue); - /* - * If the queue is empty or we are an - * ordered transaction, then it's easy. - */ - if ((bq = bufq_first(bufq)) == NULL - || (bp->b_ioflags & BIO_ORDERED) != 0) { - bufq_insert_tail(bufq, bp); - return; - } else if (bufq->insert_point != NULL) { - - /* - * A certain portion of the list is - * "locked" to preserve ordering, so - * we can only insert after the insert - * point. - */ - bq = bufq->insert_point; - } else { - - /* - * If we lie before the last removed (currently active) - * request, and are not inserting ourselves into the - * "locked" portion of the list, then we must add ourselves - * to the second request list. - */ - if (bp->b_pblkno < bufq->last_pblkno) { - - bq = bufq->switch_point; - /* - * If we are starting a new secondary list, - * then it's easy. - */ - if (bq == NULL) { - bufq->switch_point = bp; - bufq_insert_tail(bufq, bp); - return; - } - /* - * If we lie ahead of the current switch point, - * insert us before the switch point and move - * the switch point. - */ - if (bp->b_pblkno < bq->b_pblkno) { - bufq->switch_point = bp; - TAILQ_INSERT_BEFORE(bq, bp, b_act); - return; - } - } else { - if (bufq->switch_point != NULL) - be = TAILQ_PREV(bufq->switch_point, - buf_queue, b_act); - /* - * If we lie between last_pblkno and bq, - * insert before bq. - */ - if (bp->b_pblkno < bq->b_pblkno) { - TAILQ_INSERT_BEFORE(bq, bp, b_act); - return; - } - } - } - - /* - * Request is at/after our current position in the list. - * Optimize for sequential I/O by seeing if we go at the tail. - */ - if (bp->b_pblkno > be->b_pblkno) { - TAILQ_INSERT_AFTER(&bufq->queue, be, bp, b_act); - return; - } - - /* Otherwise, insertion sort */ - while ((bn = TAILQ_NEXT(bq, b_act)) != 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 (bn == bufq->switch_point - || bp->b_pblkno < bn->b_pblkno) - break; - bq = bn; - } - TAILQ_INSERT_AFTER(&bufq->queue, bq, bp, b_act); -} - - -void bioqdisksort(bioq, bp) struct bio_queue_head *bioq; struct bio *bp; |