diff options
author | phk <phk@FreeBSD.org> | 2000-04-02 15:24:56 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-04-02 15:24:56 +0000 |
commit | 8ee11d587fcf66a50146b00f04bb5db7b955b795 (patch) | |
tree | c184bd0e6c7538049e6b3655c28f4556a7c1a465 /sys/nfs | |
parent | 090fde9a7695bc804b6a26eb67cb706fd805231a (diff) | |
download | FreeBSD-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/nfs')
-rw-r--r-- | sys/nfs/nfs_bio.c | 28 | ||||
-rw-r--r-- | sys/nfs/nfs_vnops.c | 6 |
2 files changed, 20 insertions, 14 deletions
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c index b9c3e28..58fc691 100644 --- a/sys/nfs/nfs_bio.c +++ b/sys/nfs/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/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 2a36195..a331854 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/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++; |