Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 May 1999 16:57:17 -0700 (PDT)
From:      Alan Cox <alc@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern vfs_bio.c vfs_cluster.c vfs_default.c src/sys/nfs nfs.h nfs_bio.c nfs_nqlease.c nfs_socket.c nfs_vnops.c src/sys/sys buf.h src/sys/ufs/ffs ffs_inode.c src/sys/ufs/mfs mfs_vnops.c src/sys/ufs/ufs ufs_bmap.c src/sys/vm vm_fault.c ...
Message-ID:  <199905022357.QAA66046@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
alc         1999/05/02 16:57:17 PDT

  Modified files:
    sys/kern             vfs_bio.c vfs_cluster.c vfs_default.c 
    sys/nfs              nfs.h nfs_bio.c nfs_nqlease.c 
                         nfs_socket.c nfs_vnops.c 
    sys/sys              buf.h 
    sys/ufs/ffs          ffs_inode.c 
    sys/ufs/mfs          mfs_vnops.c 
    sys/ufs/ufs          ufs_bmap.c 
    sys/vm               vm_fault.c vm_page.c vm_page.h vm_pager.c 
                         vm_pager.h vnode_pager.c 
  Log:
  The VFS/BIO subsystem contained a number of hacks in order to optimize
  piecemeal, middle-of-file writes for NFS.  These hacks have caused no
  end of trouble, especially when combined with mmap().  I've removed
  them.  Instead, NFS will issue a read-before-write to fully
  instantiate the struct buf containing the write.  NFS does, however,
  optimize piecemeal appends to files.  For most common file operations,
  you will not notice the difference.  The sole remaining fragment in
  the VFS/BIO system is b_dirtyoff/end, which NFS uses to avoid cache
  coherency issues with read-merge-write style operations.  NFS also
  optimizes the write-covers-entire-buffer case by avoiding the
  read-before-write.  There is quite a bit of room for further
  optimization in these areas.
  
  The VM system marks pages fully-valid (AKA vm_page_t->valid =
  VM_PAGE_BITS_ALL) in several places, most noteably in vm_fault.  This
  is not correct operation.  The vm_pager_get_pages() code is now
  responsible for marking VM pages all-valid.  A number of VM helper
  routines have been added to aid in zeroing-out the invalid portions of
  a VM page prior to the page being marked all-valid.  This operation is
  necessary to properly support mmap().  The zeroing occurs most often
  when dealing with file-EOF situations.  Several bugs have been fixed
  in the NFS subsystem, including bits handling file and directory EOF
  situations and buf->b_flags consistancy issues relating to clearing
  B_ERROR & B_INVAL, and handling B_DONE.
  
  getblk() and allocbuf() have been rewritten.  B_CACHE operation is now
  formally defined in comments and more straightforward in
  implementation.  B_CACHE for VMIO buffers is based on the validity of
  the backing store.  B_CACHE for non-VMIO buffers is based simply on
  whether the buffer is B_INVAL or not (B_CACHE set if B_INVAL clear,
  and vise-versa).  biodone() is now responsible for setting B_CACHE
  when a successful read completes.  B_CACHE is also set when a bdwrite()
  is initiated and when a bwrite() is initiated.  VFS VOP_BWRITE
  routines (there are only two - nfs_bwrite() and bwrite()) are now
  expected to set B_CACHE.  This means that bowrite() and bawrite() also
  set B_CACHE indirectly.
  
  There are a number of places in the code which were previously using
  buf->b_bufsize (which is DEV_BSIZE aligned) when they should have
  been using buf->b_bcount.  These have been fixed.  getblk() now clears
  B_DONE on return because the rest of the system is so bad about
  dealing with B_DONE.
  
  Major fixes to NFS/TCP have been made.  A server-side bug could cause
  requests to be lost by the server due to nfs_realign() overwriting
  other rpc's in the same TCP mbuf chain.  The server's kernel must be
  recompiled to get the benefit of the fixes.
  
  Submitted by:	Matthew Dillon <dillon@apollo.backplane.com>
  
  Revision  Changes    Path
  1.208     +514 -312  src/sys/kern/vfs_bio.c
  1.81      +7 -3      src/sys/kern/vfs_cluster.c
  1.19      +12 -0     src/sys/kern/vfs_default.c
  1.46      +2 -3      src/sys/nfs/nfs.h
  1.70      +240 -173  src/sys/nfs/nfs_bio.c
  1.41      +5 -1      src/sys/nfs/nfs_nqlease.c
  1.52      +56 -82    src/sys/nfs/nfs_socket.c
  1.125     +19 -19    src/sys/nfs/nfs_vnops.c
  1.66      +36 -4     src/sys/sys/buf.h
  1.54      +2 -1      src/sys/ufs/ffs/ffs_inode.c
  1.44      +4 -1      src/sys/ufs/mfs/mfs_vnops.c
  1.26      +2 -1      src/sys/ufs/ufs/ufs_bmap.c
  1.102     +25 -5     src/sys/vm/vm_fault.c
  1.130     +40 -11    src/sys/vm/vm_page.c
  1.60      +7 -1      src/sys/vm/vm_page.h
  1.46      +4 -1      src/sys/vm/vm_pager.c
  1.22      +16 -2     src/sys/vm/vm_pager.h
  1.108     +3 -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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905022357.QAA66046>