aboutsummaryrefslogtreecommitdiff
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2000-04-02 15:24:56 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2000-04-02 15:24:56 +0000
commitc244d2de435ed1913d6a7da017b205bffb44b36d (patch)
tree46bc33c5a3d3f0f652e9af40acac38ed8c4492c6 /sys/nfsclient
parent4c9805fafa5fb041fa369df26cd26fee579223fe (diff)
downloadsrc-c244d2de435ed1913d6a7da017b205bffb44b36d.tar.gz
src-c244d2de435ed1913d6a7da017b205bffb44b36d.zip
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.
Notes
Notes: svn path=/head/; revision=58934
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_bio.c28
-rw-r--r--sys/nfsclient/nfs_vnops.c6
2 files changed, 20 insertions, 14 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c
index b9c3e286fc79..58fc6912eba9 100644
--- a/sys/nfsclient/nfs_bio.c
+++ b/sys/nfsclient/nfs_bio.c
@@ -469,7 +469,8 @@ nfs_bioread(vp, uio, ioflag, cred)
rabp->b_iocmd = BIO_READ;
vfs_busy_pages(rabp, 0);
if (nfs_asyncio(rabp, cred, p)) {
- rabp->b_flags |= B_INVAL|B_ERROR;
+ rabp->b_flags |= B_INVAL;
+ rabp->b_ioflags |= BIO_ERROR;
vfs_unbusy_pages(rabp);
brelse(rabp);
break;
@@ -558,7 +559,7 @@ again:
vfs_busy_pages(bp, 0);
error = nfs_doio(bp, cred, p);
if (error) {
- bp->b_flags |= B_ERROR;
+ bp->b_ioflags |= BIO_ERROR;
brelse(bp);
return (error);
}
@@ -653,7 +654,8 @@ again:
rabp->b_iocmd = BIO_READ;
vfs_busy_pages(rabp, 0);
if (nfs_asyncio(rabp, cred, p)) {
- rabp->b_flags |= B_INVAL|B_ERROR;
+ rabp->b_flags |= B_INVAL;
+ rabp->b_ioflags |= BIO_ERROR;
vfs_unbusy_pages(rabp);
brelse(rabp);
}
@@ -934,7 +936,8 @@ again:
if (on == 0 && n == bcount) {
bp->b_flags |= B_CACHE;
- bp->b_flags &= ~(B_ERROR | B_INVAL);
+ bp->b_flags &= ~B_INVAL;
+ bp->b_ioflags &= ~BIO_ERROR;
}
if ((bp->b_flags & B_CACHE) == 0) {
@@ -1034,7 +1037,7 @@ again:
bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK);
if (error) {
- bp->b_flags |= B_ERROR;
+ bp->b_ioflags |= BIO_ERROR;
brelse(bp);
break;
}
@@ -1204,7 +1207,7 @@ nfs_vinvalbuf(vp, flags, cred, p, intrflg)
* This is mainly to avoid queueing async I/O requests when the nfsiods
* are all hung on a dead server.
*
- * Note: nfs_asyncio() does not clear (B_ERROR|B_INVAL) but when the bp
+ * Note: nfs_asyncio() does not clear (BIO_ERROR|B_INVAL) but when the bp
* is eventually dequeued by the async daemon, nfs_doio() *will*.
*/
int
@@ -1366,11 +1369,12 @@ nfs_doio(bp, cr, p)
uiop->uio_procp = p;
/*
- * clear B_ERROR and B_INVAL state prior to initiating the I/O. We
+ * clear BIO_ERROR and B_INVAL state prior to initiating the I/O. We
* do this here so we do not have to do it in all the code that
* calls us.
*/
- bp->b_flags &= ~(B_ERROR | B_INVAL);
+ bp->b_flags &= ~B_INVAL;
+ bp->b_ioflags &= ~BIO_ERROR;
KASSERT(!(bp->b_flags & B_DONE), ("nfs_doio: bp %p already marked done", bp));
@@ -1398,7 +1402,7 @@ nfs_doio(bp, cr, p)
error = nfs_writerpc(vp, uiop, cr, &iomode, &com);
}
if (error) {
- bp->b_flags |= B_ERROR;
+ bp->b_ioflags |= BIO_ERROR;
bp->b_error = error;
}
} else if (bp->b_iocmd == BIO_READ) {
@@ -1466,7 +1470,7 @@ nfs_doio(bp, cr, p)
break;
};
if (error) {
- bp->b_flags |= B_ERROR;
+ bp->b_ioflags |= BIO_ERROR;
bp->b_error = error;
}
} else {
@@ -1545,7 +1549,7 @@ nfs_doio(bp, cr, p)
/*
* For an interrupted write, the buffer is still valid
* and the write hasn't been pushed to the server yet,
- * so we can't set B_ERROR and report the interruption
+ * so we can't set BIO_ERROR and report the interruption
* by setting B_EINTR. For the B_ASYNC case, B_EINTR
* is not relevant, so the rpc attempt is essentially
* a noop. For the case of a V3 write rpc not being
@@ -1575,7 +1579,7 @@ nfs_doio(bp, cr, p)
splx(s);
} else {
if (error) {
- bp->b_flags |= B_ERROR;
+ bp->b_ioflags |= BIO_ERROR;
bp->b_error = np->n_error = error;
np->n_flag |= NWRITEERR;
}
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index 2a36195547b6..a33185401269 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -2939,7 +2939,8 @@ again:
vp->v_numoutput++;
bp->b_flags |= B_ASYNC;
bundirty(bp);
- bp->b_flags &= ~(B_DONE|B_ERROR);
+ bp->b_flags &= ~B_DONE;
+ bp->b_ioflags &= ~BIO_ERROR;
bp->b_dirtyoff = bp->b_dirtyend = 0;
splx(s);
biodone(bp);
@@ -3116,7 +3117,8 @@ nfs_writebp(bp, force, procp)
s = splbio();
bundirty(bp);
- bp->b_flags &= ~(B_DONE|B_ERROR);
+ bp->b_flags &= ~B_DONE;
+ bp->b_ioflags &= ~BIO_ERROR;
bp->b_iocmd = BIO_WRITE;
bp->b_vp->v_numoutput++;