summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/swap_pager.c11
-rw-r--r--sys/vm/vm_pager.c23
-rw-r--r--sys/vm/vm_swap.c6
-rw-r--r--sys/vm/vnode_pager.c4
4 files changed, 22 insertions, 22 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index 683eb9d..f4c598e 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -824,7 +824,8 @@ swap_pager_strategy(vm_object_t object, struct buf *bp)
if (bp->b_bcount & PAGE_MASK) {
bp->b_error = EINVAL;
- bp->b_flags |= B_ERROR | B_INVAL;
+ bp->b_ioflags |= BIO_ERROR;
+ bp->b_flags |= B_INVAL;
biodone(bp);
printf("swap_pager_strategy: bp %p b_vp %p blk %d size %d, not page bounded\n", bp, bp->b_vp, (int)bp->b_pblkno, (int)bp->b_bcount);
return;
@@ -835,7 +836,7 @@ swap_pager_strategy(vm_object_t object, struct buf *bp)
*/
bp->b_error = 0;
- bp->b_flags &= ~B_ERROR;
+ bp->b_ioflags &= ~BIO_ERROR;
bp->b_resid = bp->b_bcount;
start = bp->b_pblkno;
@@ -877,7 +878,7 @@ swap_pager_strategy(vm_object_t object, struct buf *bp)
blk = swp_pager_getswapspace(1);
if (blk == SWAPBLK_NONE) {
bp->b_error = ENOMEM;
- bp->b_flags |= B_ERROR;
+ bp->b_ioflags |= BIO_ERROR;
break;
}
swp_pager_meta_build(object, start, blk);
@@ -1478,7 +1479,7 @@ swp_pager_async_iodone(bp)
* report error
*/
- if (bp->b_flags & B_ERROR) {
+ if (bp->b_ioflags & BIO_ERROR) {
printf(
"swap_pager: I/O error - %s failed; blkno %ld,"
"size %ld, error %d\n",
@@ -1517,7 +1518,7 @@ swp_pager_async_iodone(bp)
vm_page_flag_clear(m, PG_SWAPINPROG);
- if (bp->b_flags & B_ERROR) {
+ if (bp->b_ioflags & BIO_ERROR) {
/*
* If an error occurs I'd love to throw the swapblk
* away without freeing it back to swapspace, so it
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);
diff --git a/sys/vm/vm_swap.c b/sys/vm/vm_swap.c
index 5b2b514..9df828f 100644
--- a/sys/vm/vm_swap.c
+++ b/sys/vm/vm_swap.c
@@ -104,7 +104,7 @@ swapdev_strategy(ap)
off = bp->b_blkno % dmmax;
if (off + sz > dmmax) {
bp->b_error = EINVAL;
- bp->b_flags |= B_ERROR;
+ bp->b_ioflags |= BIO_ERROR;
biodone(bp);
return 0;
}
@@ -118,14 +118,14 @@ swapdev_strategy(ap)
sp = &swdevt[index];
if (bp->b_blkno + sz > sp->sw_nblks) {
bp->b_error = EINVAL;
- bp->b_flags |= B_ERROR;
+ bp->b_ioflags |= BIO_ERROR;
biodone(bp);
return 0;
}
bp->b_dev = sp->sw_device;
if (sp->sw_vp == NULL) {
bp->b_error = ENODEV;
- bp->b_flags |= B_ERROR;
+ bp->b_ioflags |= BIO_ERROR;
biodone(bp);
return 0;
}
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index fee5555..95d1ebc 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -434,7 +434,7 @@ vnode_pager_input_smlfs(object, m)
tsleep(bp, PVM, "vnsrd", 0);
}
splx(s);
- if ((bp->b_flags & B_ERROR) != 0)
+ if ((bp->b_ioflags & BIO_ERROR) != 0)
error = EIO;
/*
@@ -755,7 +755,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
tsleep(bp, PVM, "vnread", 0);
}
splx(s);
- if ((bp->b_flags & B_ERROR) != 0)
+ if ((bp->b_ioflags & BIO_ERROR) != 0)
error = EIO;
if (!error) {
OpenPOWER on IntegriCloud