aboutsummaryrefslogtreecommitdiff
path: root/sys/nfsclient/nfs_bio.c
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>1996-07-16 10:19:45 +0000
committerDoug Rabson <dfr@FreeBSD.org>1996-07-16 10:19:45 +0000
commit09c68847292a9a5e3154dc7fd4d297317a554cf1 (patch)
treec09adb4e15413a694fad7e62a52249b526659ec7 /sys/nfsclient/nfs_bio.c
parent8f2a955a0d706bf25d1a3a9e258dc77e30f7f406 (diff)
downloadsrc-09c68847292a9a5e3154dc7fd4d297317a554cf1.tar.gz
src-09c68847292a9a5e3154dc7fd4d297317a554cf1.zip
Various fixes from frank@fwi.uva.nl (Frank van der Linden) via
rick@snowhite.cis.uoguelph.ca: 1. Clear B_NEEDCOMMIT in nfs_write to make sure that dirty data is correctly send to the server. If a buffer was dirtied when it was in the B_DELWRI+B_NEEDCOMMIT state, the state of the buffer was left unchanged and when the buffer was later cleaned, just a commit rpc was made to the server to complete the previous write. Clearing B_NEEDCOMMIT ensures that another write is made to the server. 2. If a server returned a server (for whatever reason) returned an answer to a write RPC that implied that fewer bytes than requested were written, bad things would happen. 3. The setattr operation passed on the atime in stead of the mtime to the server. The fix is trivial. 4. XIDs always started at 0, but this caused some servers (older DEC OSF/1 3.0 so I've been told) who had very long-lasting XID caches to get confused if, after a reboot of a BSD client, RPCs came in with a XID that had in the past been used before from that client. Patch is to use the current time in seconds as a starting point for XIDs. The patch below is not perfect, because it requires the root fs to be mounted first. This is because of the check BSD systems do, comparing FS time to system time. Reviewed by: Bruce Evans, Terry Lambert. Obtained from: frank@fwi.uva.nl (Frank van der Linden) via rick@snowhite.cis.uoguelph.ca
Notes
Notes: svn path=/head/; revision=17186
Diffstat (limited to 'sys/nfsclient/nfs_bio.c')
-rw-r--r--sys/nfsclient/nfs_bio.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c
index b5b76685277c..d1bb47e636ad 100644
--- a/sys/nfsclient/nfs_bio.c
+++ b/sys/nfsclient/nfs_bio.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.5 (Berkeley) 1/4/94
- * $Id: nfs_bio.c,v 1.22 1996/01/24 18:52:18 mpp Exp $
+ * $Id: nfs_bio.c,v 1.23 1996/06/08 05:59:04 pst Exp $
*/
#include <sys/param.h>
@@ -584,6 +584,13 @@ again:
bp->b_validoff = min(bp->b_validoff, bp->b_dirtyoff);
bp->b_validend = max(bp->b_validend, bp->b_dirtyend);
}
+
+ /*
+ * Since this block is being modified, it must be written
+ * again and not just committed.
+ */
+ bp->b_flags &= ~B_NEEDCOMMIT;
+
/*
* If the lease is non-cachable or IO_SYNC do bwrite().
*/