summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_pager.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-04-02 15:24:56 +0000
committerphk <phk@FreeBSD.org>2000-04-02 15:24:56 +0000
commit8ee11d587fcf66a50146b00f04bb5db7b955b795 (patch)
treec184bd0e6c7538049e6b3655c28f4556a7c1a465 /sys/vm/vm_pager.c
parent090fde9a7695bc804b6a26eb67cb706fd805231a (diff)
downloadFreeBSD-src-8ee11d587fcf66a50146b00f04bb5db7b955b795.zip
FreeBSD-src-8ee11d587fcf66a50146b00f04bb5db7b955b795.tar.gz
Move B_ERROR flag to b_ioflags and call it BIO_ERROR.
(Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde.
Diffstat (limited to 'sys/vm/vm_pager.c')
-rw-r--r--sys/vm/vm_pager.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c
index 2f84d45..5890024 100644
--- a/sys/vm/vm_pager.c
+++ b/sys/vm/vm_pager.c
@@ -267,7 +267,7 @@ vm_pager_strategy(vm_object_t object, struct buf *bp)
if (pagertab[object->type]->pgo_strategy) {
(*pagertab[object->type]->pgo_strategy)(object, bp);
} else {
- bp->b_flags |= B_ERROR;
+ bp->b_ioflags |= BIO_ERROR;
bp->b_error = ENXIO;
biodone(bp);
}
@@ -348,6 +348,7 @@ initpbuf(struct buf *bp)
bp->b_kvasize = MAXPHYS;
bp->b_xflags = 0;
bp->b_flags = 0;
+ bp->b_ioflags = 0;
bp->b_iodone = NULL;
bp->b_error = 0;
BUF_LOCK(bp, LK_EXCLUSIVE);
@@ -496,11 +497,11 @@ vm_pager_chain_iodone(struct buf *nbp)
struct buf *bp;
if ((bp = nbp->b_chain.parent) != NULL) {
- if (nbp->b_flags & B_ERROR) {
- bp->b_flags |= B_ERROR;
+ if (nbp->b_ioflags & BIO_ERROR) {
+ bp->b_ioflags |= BIO_ERROR;
bp->b_error = nbp->b_error;
} else if (nbp->b_resid != 0) {
- bp->b_flags |= B_ERROR;
+ bp->b_ioflags |= BIO_ERROR;
bp->b_error = EINVAL;
} else {
bp->b_resid -= nbp->b_bcount;
@@ -513,8 +514,8 @@ vm_pager_chain_iodone(struct buf *nbp)
}
if (!bp->b_chain.count && (bp->b_flags & B_AUTOCHAINDONE)) {
bp->b_flags &= ~B_AUTOCHAINDONE;
- if (bp->b_resid != 0 && !(bp->b_flags & B_ERROR)) {
- bp->b_flags |= B_ERROR;
+ if (bp->b_resid != 0 && !(bp->b_ioflags & BIO_ERROR)) {
+ bp->b_ioflags |= BIO_ERROR;
bp->b_error = EINVAL;
}
biodone(bp);
@@ -531,9 +532,6 @@ vm_pager_chain_iodone(struct buf *nbp)
* Obtain a physical buffer and chain it to its parent buffer. When
* I/O completes, the parent buffer will be B_SIGNAL'd. Errors are
* automatically propagated to the parent
- *
- * Since these are brand new buffers, we do not have to clear B_INVAL
- * and B_ERROR because they are already clear.
*/
struct buf *
@@ -547,7 +545,8 @@ getchainbuf(struct buf *bp, struct vnode *vp, int flags)
if (bp->b_chain.count > 4)
waitchainbuf(bp, 4, 0);
- nbp->b_flags = (bp->b_flags & B_ORDERED) | flags;
+ nbp->b_ioflags = bp->b_ioflags & BIO_ORDERED;
+ nbp->b_flags = flags;
nbp->b_rcred = nbp->b_wcred = proc0.p_ucred;
nbp->b_iodone = vm_pager_chain_iodone;
@@ -584,8 +583,8 @@ waitchainbuf(struct buf *bp, int count, int done)
tsleep(bp, PRIBIO + 4, "bpchain", 0);
}
if (done) {
- if (bp->b_resid != 0 && !(bp->b_flags & B_ERROR)) {
- bp->b_flags |= B_ERROR;
+ if (bp->b_resid != 0 && !(bp->b_ioflags & BIO_ERROR)) {
+ bp->b_ioflags |= BIO_ERROR;
bp->b_error = EINVAL;
}
biodone(bp);
OpenPOWER on IntegriCloud