summaryrefslogtreecommitdiffstats
path: root/sys/nfs
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1997-06-16 00:23:40 +0000
committerdyson <dyson@FreeBSD.org>1997-06-16 00:23:40 +0000
commit8b3feca679157b39977ecf36b9421a76975d0be2 (patch)
treeaffe7c5cd28f7f8682886aa7b03dfd9dbb855682 /sys/nfs
parentdb14cfe28ce4bf25b10fe802ade2cb9e5434d430 (diff)
downloadFreeBSD-src-8b3feca679157b39977ecf36b9421a76975d0be2.zip
FreeBSD-src-8b3feca679157b39977ecf36b9421a76975d0be2.tar.gz
Upgrade NFS to support the new vfs_bio resource/buffer management.
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_bio.c3
-rw-r--r--sys/nfs/nfs_vnops.c13
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c
index f2e8316..45a37b9 100644
--- a/sys/nfs/nfs_bio.c
+++ b/sys/nfs/nfs_bio.c
@@ -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;
/*
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index 387c424..22540a3 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -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 @@ again:
} 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)) {
OpenPOWER on IntegriCloud