From 57c10583aa0f409c32126cb480f6b8ca59724ed1 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 22 Feb 2002 09:26:35 +0000 Subject: [PATCH] GC: BIO_ORDERED, various infrastructure dealing with BIO_ORDERED. --- sys/kern/subr_devstat.c | 3 +-- sys/kern/subr_disklabel.c | 3 +-- sys/kern/vfs_bio.c | 2 -- sys/sys/bio.h | 6 +----- sys/vm/swap_pager.c | 2 +- 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c index 8831a2f8fcc0..dabdf9d08b30 100644 --- a/sys/kern/subr_devstat.c +++ b/sys/kern/subr_devstat.c @@ -240,8 +240,7 @@ devstat_end_transaction_bio(struct devstat *ds, struct bio *bp) flg = DEVSTAT_WRITE; devstat_end_transaction(ds, bp->bio_bcount - bp->bio_resid, - (bp->bio_flags & BIO_ORDERED) ? - DEVSTAT_TAG_ORDERED : DEVSTAT_TAG_SIMPLE, flg); + DEVSTAT_TAG_SIMPLE, flg); } /* diff --git a/sys/kern/subr_disklabel.c b/sys/kern/subr_disklabel.c index a0f2f3dba419..05339cbcf963 100644 --- a/sys/kern/subr_disklabel.c +++ b/sys/kern/subr_disklabel.c @@ -105,8 +105,7 @@ bioqdisksort(bioq, bp) * If the queue is empty or we are an * ordered transaction, then it's easy. */ - if ((bq = bioq_first(bioq)) == NULL - || (bp->bio_flags & BIO_ORDERED) != 0) { + if ((bq = bioq_first(bioq)) == NULL) { bioq_insert_tail(bioq, bp); bioq->busy = 0; return; diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 386d1dd8d72a..32e91ca87d2d 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1286,7 +1286,6 @@ brelse(struct buf * bp) BUF_UNLOCK(bp); bp->b_flags &= ~(B_ASYNC | B_NOCACHE | B_AGE | B_RELBUF | B_DIRECT | B_NOWDRAIN); - bp->b_ioflags &= ~BIO_ORDERED; if ((bp->b_flags & B_DELWRI) == 0 && (bp->b_xflags & BX_VNDIRTY)) panic("brelse: not dirty"); splx(s); @@ -1356,7 +1355,6 @@ bqrelse(struct buf * bp) /* unlock */ BUF_UNLOCK(bp); bp->b_flags &= ~(B_ASYNC | B_NOCACHE | B_AGE | B_RELBUF); - bp->b_ioflags &= ~BIO_ORDERED; if ((bp->b_flags & B_DELWRI) == 0 && (bp->b_xflags & BX_VNDIRTY)) panic("bqrelse: not dirty"); splx(s); diff --git a/sys/sys/bio.h b/sys/sys/bio.h index 6536e9d99d2a..c1c515b2285e 100644 --- a/sys/sys/bio.h +++ b/sys/sys/bio.h @@ -93,7 +93,6 @@ struct bio { /* bio_flags */ #define BIO_ERROR 0x00000001 -#define BIO_ORDERED 0x00000002 #define BIO_DONE 0x00000004 #define BIO_FLAG2 0x40000000 /* Available for local hacks */ #define BIO_FLAG1 0x80000000 /* Available for local hacks */ @@ -152,10 +151,7 @@ bioq_init(struct bio_queue_head *head) static __inline void bioq_insert_tail(struct bio_queue_head *head, struct bio *bp) { - if ((bp->bio_flags & BIO_ORDERED) != 0) { - head->insert_point = bp; - head->switch_point = NULL; - } + TAILQ_INSERT_TAIL(&head->queue, bp, bio_queue); } diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index b8880efcea74..57f2c9ce6588 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2078,7 +2078,7 @@ getchainbuf(struct bio *bp, struct vnode *vp, int flags) waitchainbuf(bp, 4, 0); nbp->b_iocmd = bp->bio_cmd; - nbp->b_ioflags = bp->bio_flags & BIO_ORDERED; + nbp->b_ioflags = 0; nbp->b_flags = flags; nbp->b_rcred = crhold(proc0.p_ucred); nbp->b_wcred = crhold(proc0.p_ucred);