diff options
author | dfr <dfr@FreeBSD.org> | 1997-06-06 09:04:28 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1997-06-06 09:04:28 +0000 |
commit | 041a050592a40a39317e2e28a6df2312d1af501b (patch) | |
tree | e76b311dd611aec6d0bf21f10fac6d5033680ebb /sys/kern | |
parent | 387269f8b234cd5fcb8b4d127a4c26d87790b2d6 (diff) | |
download | FreeBSD-src-041a050592a40a39317e2e28a6df2312d1af501b.zip FreeBSD-src-041a050592a40a39317e2e28a6df2312d1af501b.tar.gz |
Don't throw NFS B_DELWRI buffers back to the vm system in brelse.
Make sure that b_validoff..b_validend is at least as big as
b_dirtyoff..b_dirtyend.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_bio.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 5a18252..50de22f 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -18,7 +18,7 @@ * 5. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: vfs_bio.c,v 1.117 1997/05/30 22:25:35 dfr Exp $ + * $Id: vfs_bio.c,v 1.118 1997/06/03 09:42:43 dfr Exp $ */ /* @@ -515,6 +515,8 @@ brelse(struct buf * bp) * XXX this seems to cause performance problems. */ if ((bp->b_flags & B_VMIO) + && !(bp->b_vp->v_tag == VT_NFS && + (bp->b_flags & B_DELWRI) != 0) #ifdef notdef && (bp->b_vp->v_tag != VT_NFS || (bp->b_flags & (B_NOCACHE | B_INVAL | B_ERROR)) @@ -1498,8 +1500,14 @@ allocbuf(struct buf * bp, int size) bp->b_pages[pageindex] = m; curbpnpages = pageindex + 1; } - if (vp->v_tag == VT_NFS && bp->b_validend == 0) - bp->b_flags &= ~B_CACHE; + if (vp->v_tag == VT_NFS) { + if (bp->b_dirtyend > 0) { + bp->b_validoff = min(bp->b_validoff, bp->b_dirtyoff); + bp->b_validend = max(bp->b_validend, bp->b_dirtyend); + } + if (bp->b_validend == 0) + bp->b_flags &= ~B_CACHE; + } bp->b_data = (caddr_t) trunc_page(bp->b_data); bp->b_npages = curbpnpages; pmap_qenter((vm_offset_t) bp->b_data, |