From owner-cvs-all Thu Dec 13 17:17: 7 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7D29237B416; Thu, 13 Dec 2001 17:16:57 -0800 (PST) Received: (from dillon@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fBE1GvO08874; Thu, 13 Dec 2001 17:16:57 -0800 (PST) (envelope-from dillon) Message-Id: <200112140116.fBE1GvO08874@freefall.freebsd.org> From: Matt Dillon Date: Thu, 13 Dec 2001 17:16:57 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern vfs_bio.c src/sys/nfsclient nfs.h nfs_bio.c nfs_vnops.c src/sys/vm vm_page.c vnode_pager.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG dillon 2001/12/13 17:16:57 PST Modified files: sys/kern vfs_bio.c sys/nfsclient nfs.h nfs_bio.c nfs_vnops.c sys/vm vm_page.c vnode_pager.c Log: This fixes a large number of bugs in our NFS client side code. A recent commit by Kirk also fixed a softupdates bug that could easily be triggered by server side NFS. * An edge case with shared R+W mmap()'s and truncate whereby the system would inappropriately clear the dirty bits on still-dirty data. (applicable to all filesystems) THIS FIX TEMPORARILY DISABLED PENDING FURTHER TESTING. see vm/vm_page.c line 1641 * The straddle case for VM pages and buffer cache buffers when truncating. (applicable to NFS client side) * Possible SMP database corruption due to vm_pager_unmap_page() not clearing the TLB for the other cpu's. (applicable to NFS client side but could effect all filesystems). Note: not considered serious since the corruption occurs beyond the file EOF. * When flusing a dirty buffer due to B_CACHE getting cleared, we were accidently setting B_CACHE again (that is, bwrite() sets B_CACHE), when we really want it to stay clear after the write is complete. This resulted in a corrupt buffer. (applicable to all filesystems but probably only triggered by NFS) * We have to call vtruncbuf() when ftruncate()ing to remove any buffer cache buffers. This is still tentitive, I may be able to remove it due to the second bug fix. (applicable to NFS client side) * vnode_pager_setsize() race against nfs_vinvalbuf()... we have to set n_size before calling nfs_vinvalbuf or the NFS code may recursively vnode_pager_setsize() to the original value before the truncate. This is what was causing the user mmap bus faults in the nfs tester program. (applicable to NFS client side) * Fix to softupdates (see ufs/ffs/ffs_inode.c 1.73, commit made by Kirk). Testing program written by: Avadis Tevanian, Jr. Testing program supplied by: jkh / Apple (see Dec2001 posting to freebsd-hackers with Subject 'NFS: How to make FreeBS fall on its face in one easy step') MFC after: 1 week Revision Changes Path 1.295 +12 -0 src/sys/kern/vfs_bio.c 1.64 +3 -1 src/sys/nfsclient/nfs.h 1.104 +55 -4 src/sys/nfsclient/nfs_bio.c 1.180 +18 -5 src/sys/nfsclient/nfs_vnops.c 1.175 +14 -0 src/sys/vm/vm_page.c 1.140 +27 -2 src/sys/vm/vnode_pager.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message