Upgrade NFS to support the new vfs_bio resource/buffer management.

This commit is contained in:
John Dyson 1997-06-16 00:23:40 +00:00
parent 4a40e3d42f
commit 91487cf4bf
4 changed files with 28 additions and 4 deletions

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
* $Id: nfs_bio.c,v 1.39 1997/06/03 09:42:36 dfr Exp $
* $Id: nfs_bio.c,v 1.40 1997/06/06 08:12:17 dfr Exp $
*/
@ -1074,6 +1074,7 @@ nfs_doio(bp, cr, p)
if (error == EINTR
|| (!error && (bp->b_flags & B_NEEDCOMMIT))) {
bp->b_flags &= ~(B_INVAL|B_NOCACHE);
++numdirtybuffers;
bp->b_flags |= B_DELWRI;
/*

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95
* $Id: nfs_vnops.c,v 1.52 1997/06/03 10:03:40 dfr Exp $
* $Id: nfs_vnops.c,v 1.53 1997/06/03 13:56:55 dfr Exp $
*/
@ -2926,6 +2926,12 @@ nfs_flush(vp, cred, waitfor, p, commit)
} else {
vp->v_numoutput++;
bp->b_flags |= B_ASYNC;
if (bp->b_flags & B_DELWRI) {
--numdirtybuffers;
if (needsbuffer) {
vfs_bio_need_satisfy();
}
}
bp->b_flags &= ~(B_READ|B_DONE|B_ERROR|B_DELWRI);
bp->b_dirtyoff = bp->b_dirtyend = 0;
reassignbuf(bp, vp);
@ -3192,6 +3198,11 @@ nfs_writebp(bp, force)
if(!(bp->b_flags & B_BUSY))
panic("bwrite: buffer is not busy???");
if (bp->b_flags & B_DELWRI) {
--numdirtybuffers;
if (needsbuffer)
vfs_bio_need_satisfy();
}
bp->b_flags &= ~(B_READ|B_DONE|B_ERROR|B_DELWRI);
if ((oldflags & (B_ASYNC|B_DELWRI)) == (B_ASYNC|B_DELWRI)) {

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
* $Id: nfs_bio.c,v 1.39 1997/06/03 09:42:36 dfr Exp $
* $Id: nfs_bio.c,v 1.40 1997/06/06 08:12:17 dfr Exp $
*/
@ -1074,6 +1074,7 @@ nfs_doio(bp, cr, p)
if (error == EINTR
|| (!error && (bp->b_flags & B_NEEDCOMMIT))) {
bp->b_flags &= ~(B_INVAL|B_NOCACHE);
++numdirtybuffers;
bp->b_flags |= B_DELWRI;
/*

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95
* $Id: nfs_vnops.c,v 1.52 1997/06/03 10:03:40 dfr Exp $
* $Id: nfs_vnops.c,v 1.53 1997/06/03 13:56:55 dfr Exp $
*/
@ -2926,6 +2926,12 @@ nfs_flush(vp, cred, waitfor, p, commit)
} else {
vp->v_numoutput++;
bp->b_flags |= B_ASYNC;
if (bp->b_flags & B_DELWRI) {
--numdirtybuffers;
if (needsbuffer) {
vfs_bio_need_satisfy();
}
}
bp->b_flags &= ~(B_READ|B_DONE|B_ERROR|B_DELWRI);
bp->b_dirtyoff = bp->b_dirtyend = 0;
reassignbuf(bp, vp);
@ -3192,6 +3198,11 @@ nfs_writebp(bp, force)
if(!(bp->b_flags & B_BUSY))
panic("bwrite: buffer is not busy???");
if (bp->b_flags & B_DELWRI) {
--numdirtybuffers;
if (needsbuffer)
vfs_bio_need_satisfy();
}
bp->b_flags &= ~(B_READ|B_DONE|B_ERROR|B_DELWRI);
if ((oldflags & (B_ASYNC|B_DELWRI)) == (B_ASYNC|B_DELWRI)) {