mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-22 08:53:41 +01:00
GC: BIO_ORDERED, various infrastructure dealing with BIO_ORDERED.
This commit is contained in:
parent
af91f4fa16
commit
57c10583aa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=91063
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user