aboutsummaryrefslogtreecommitdiff
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>1997-04-18 14:12:17 +0000
committerDoug Rabson <dfr@FreeBSD.org>1997-04-18 14:12:17 +0000
commit18cab10cb3710061d183e3e1328ebaf136ec030b (patch)
treea188f5f154108b369838699e36a2d66ee560f59b /sys/nfsclient
parente38dff171855e543d172583ffab4256d046895d1 (diff)
downloadsrc-18cab10cb3710061d183e3e1328ebaf136ec030b.tar.gz
src-18cab10cb3710061d183e3e1328ebaf136ec030b.zip
Don't allow partial buffers to be cluster-comitted.
Zero the b_dirty{off,end} after cluster-comitting a group of buffers. With these fixes, I was able to complete a 'make world' with remote src and obj directories.
Notes
Notes: svn path=/head/; revision=25003
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_bio.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c
index b5912b585724..a63fd78390e6 100644
--- a/sys/nfsclient/nfs_bio.c
+++ b/sys/nfsclient/nfs_bio.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
- * $Id: nfs_bio.c,v 1.33 1997/03/09 10:21:26 bde Exp $
+ * $Id: nfs_bio.c,v 1.34 1997/04/03 07:52:00 dfr Exp $
*/
@@ -962,9 +962,12 @@ nfs_doio(bp, cr, p)
iomode = NFSV3WRITE_FILESYNC;
bp->b_flags |= B_WRITEINPROG;
error = nfs_writerpc(vp, uiop, cr, &iomode, &must_commit);
- if (!error && iomode == NFSV3WRITE_UNSTABLE)
- bp->b_flags |= B_NEEDCOMMIT | B_CLUSTEROK;
- else
+ if (!error && iomode == NFSV3WRITE_UNSTABLE) {
+ bp->b_flags |= B_NEEDCOMMIT;
+ if (bp->b_dirtyoff == 0
+ && bp->b_dirtyend == bp->b_bufsize)
+ bp->b_flags |= B_CLUSTEROK;
+ } else
bp->b_flags &= ~B_NEEDCOMMIT;
bp->b_flags &= ~B_WRITEINPROG;