aboutsummaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_bio.c
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>1997-04-19 14:28:36 +0000
committerDoug Rabson <dfr@FreeBSD.org>1997-04-19 14:28:36 +0000
commitbaaf1d96f0906ca8ca6a0a199b2656ed8a52361a (patch)
tree377050f42c92716f0fdcefdef30f0e854a242996 /sys/nfs/nfs_bio.c
parent0e4f24a34e29fef7cbdcbe4654c6833bc7c09b64 (diff)
downloadsrc-baaf1d96f0906ca8ca6a0a199b2656ed8a52361a.tar.gz
src-baaf1d96f0906ca8ca6a0a199b2656ed8a52361a.zip
Fix a bug where a program which appended many small records to a file could
wind up writing zeros instead of real data when the file is on an NFSv2 mounted directory. While tracking this bug down, I noticed that nfs_asyncio was waking *all* the iods when a block was written instead of just one per block. Fixing this gives a 25% performance improvment for writes on v2 (less for v3). Both are 2.2 candidates. PR: kern/2774
Notes
Notes: svn path=/head/; revision=25023
Diffstat (limited to 'sys/nfs/nfs_bio.c')
-rw-r--r--sys/nfs/nfs_bio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c
index a63fd78390e6..5ecf4e1bc7e5 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.34 1997/04/03 07:52:00 dfr Exp $
+ * $Id: nfs_bio.c,v 1.35 1997/04/18 14:11:59 dfr Exp $
*/
@@ -502,6 +502,7 @@ nfs_write(ap)
again:
if (uio->uio_offset + n > np->n_size) {
np->n_size = uio->uio_offset + n;
+ np->n_flag |= NMODIFIED;
vnode_pager_setsize(vp, (u_long)np->n_size);
}
bufsize = biosize;
@@ -747,6 +748,7 @@ again:
nmp->nm_bufqiods++;
wakeup((caddr_t)&nfs_iodwant[i]);
gotiod = TRUE;
+ break;
}
/*