1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-18 15:30:21 +00:00

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.
This commit is contained in:
Matthew Dillon 1999-01-24 00:51:11 +00:00
parent 1c2587457f
commit 377f9b28a6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=43118

View File

@ -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 @@ getblk(struct vnode * vp, daddr_t blkno, int size, int slpflag, int slptimeo)
* 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;