summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-01-24 00:51:11 +0000
committerdillon <dillon@FreeBSD.org>1999-01-24 00:51:11 +0000
commit6db82357cae21f402469dd9f1c1f698833aa8e17 (patch)
tree3d779213d37755ca99a0a7a67b1e0d9b8114e805 /sys/kern/vfs_bio.c
parentd0d15b4eb802a43147eac8488418ce054cc534f7 (diff)
downloadFreeBSD-src-6db82357cae21f402469dd9f1c1f698833aa8e17.zip
FreeBSD-src-6db82357cae21f402469dd9f1c1f698833aa8e17.tar.gz
Don't try to calculate B_CACHE for an NFS related bp that has a
> 0 b_validend. This will screw up small-writes, causing lots of little writes out the network. We will assume that NFS handles B_CACHE properly.
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index b09a6f2..5d3b1ff 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -11,7 +11,7 @@
* 2. Absolutely no warranty of function or purpose is made by the author
* John S. Dyson.
*
- * $Id: vfs_bio.c,v 1.196 1999/01/22 08:59:05 dg Exp $
+ * $Id: vfs_bio.c,v 1.197 1999/01/23 06:36:15 dillon Exp $
*/
/*
@@ -1482,7 +1482,10 @@ loop:
* check the cases and then turn the clearing part of this
* code into a panic.
*/
- if ((bp->b_flags & (B_VMIO|B_CACHE)) == (B_VMIO|B_CACHE)) {
+ if (
+ (bp->b_flags & (B_VMIO|B_CACHE)) == (B_VMIO|B_CACHE) &&
+ (bp->b_vp->v_tag != VT_NFS || bp->b_validend <= 0)
+ ) {
int checksize = bp->b_bufsize;
int poffset = bp->b_offset & PAGE_MASK;
int resid;
OpenPOWER on IntegriCloud