diff options
author | phk <phk@FreeBSD.org> | 2000-04-18 13:25:19 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-04-18 13:25:19 +0000 |
commit | 99e3753c3a5df9ea3e135017ae31e1c094d7019f (patch) | |
tree | a79a8d9bde359e90db2e2ffe35e23ded592b3430 /sys/ufs | |
parent | 3204ce2590dec55174e34a91d75b2fab6aa37677 (diff) | |
download | FreeBSD-src-99e3753c3a5df9ea3e135017ae31e1c094d7019f.zip FreeBSD-src-99e3753c3a5df9ea3e135017ae31e1c094d7019f.tar.gz |
Retire bufqdisksort(), all drivers use bioqdisksort now.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_disksubr.c | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/sys/ufs/ufs/ufs_disksubr.c b/sys/ufs/ufs/ufs_disksubr.c index 8a1fc0b..f3f7b98 100644 --- a/sys/ufs/ufs/ufs_disksubr.c +++ b/sys/ufs/ufs/ufs_disksubr.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; |