Subject: Re: Strange/weird '*fs' effects in -current (1.5Q till now)
To: Markus W Kilbinger <kilbi@rad.rwth-aachen.de>
From: enami tsugutomo <enami@sm.sony.co.jp>
List: current-users
Date: 02/20/2001 23:19:06
> >From ktrace and tcpdump output, kernel doesn't issue necessary nfs
> write rpc before truncate.

It looks like the following diff (flush the page if it is an async i/o
and is the very last page) fixes at least the mutt test case for me.

enami.

Index: nfs_bio.c
===================================================================
RCS file: /cvsroot/syssrc/sys/nfs/nfs_bio.c,v
retrieving revision 1.62
diff -u -r1.62 nfs_bio.c
--- nfs_bio.c	2001/02/18 15:52:32	1.62
+++ nfs_bio.c	2001/02/20 14:12:13
@@ -627,7 +627,8 @@
 			    PGO_CLEANIT|PGO_SYNCIO);
 			simple_unlock(&vp->v_uvm.u_obj.vmobjlock);
 		} else if ((oldoff & ~(nmp->nm_wsize - 1)) !=
-		    (uio->uio_offset & ~(nmp->nm_wsize - 1))) {
+		    (uio->uio_offset & ~(nmp->nm_wsize - 1)) ||
+		    uio->uio_resid == 0) {
 			simple_lock(&vp->v_uvm.u_obj.vmobjlock);
 			rv = vp->v_uvm.u_obj.pgops->pgo_flush(
 			    &vp->v_uvm.u_obj,