cvs commit: src/usr.sbin/pstat pstat.c src/sys/vfs/nfs nfs.h nfs_bio.c nfs_node.c nfs_nqlease.c nfs_subs.c nfs_vfsops.c nfs_vnops.c nfsm_subs.h nfsnode.h

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Mar 17 09:29:56 PST 2005


dillon      2005/03/17 09:28:46 PST

DragonFly src repository

  Modified files:
    usr.sbin/pstat       pstat.c 
    sys/vfs/nfs          nfs.h nfs_bio.c nfs_node.c nfs_nqlease.c 
                         nfs_subs.c nfs_vfsops.c nfs_vnops.c 
                         nfsm_subs.h nfsnode.h 
  Log:
  Clean up a number of caching edge cases in NFS, rework the code to be
  a bit more readable, document some bits, and fix some cache coherency
  detection issues.  The caching cleanups should allow the NFS client to
  retain more of the NFS cache when doing complex operations on a file.
  
  * Properly check and update the mtime using WCC records in the NFS response.
    This record gives us the 'before' and 'after' mtime.  The 'before' mtime
    must match our existing idea of the mtime, if it doesn't we flag the
    nfsnode as having been modified by the server.  Our notion of the mtime
    is then set to the 'after time.  This was not being done properly for
    several edge cases.
  
    This required extending the nfsm macros a bit in order to be able to tell
    loadattrcache how to handle the mtime data.  This also required rearranging
    (really fixing) the sequence in nfs_open(), nfs_write(), etc.
  
  * Rearrange the flags a bit.  NSIZECHANGED -> NRMODIFIED (nfsnode modified
    by server), NMODIFIED -> NLMODIFIED (nfsnode modified by client).  Do
    not clear NRMODIFIED until we have actually invalidated the cache (this
    fixes a problem where programs using mmap() were not properly clearing
    the cache after a file was modified on the server).
  
  * Don't code NRMODIFIED as an exception to NLMODIFIED.  Recode the flags so
    they (mostly) operate in tandem.
  
  * When appending to a file, use nfs_flush() instead of nfs_vinvalbuf().
    There is no need to destroy our data cache for the file.  This makes
    appends considerably more efficient.
  
  * Hopefully fix the last problem associated with attribute timeouts.
  
  * Clear the attribute cache when a file is opened for write in nfs_open()
    BEFORE doing other checks rather then after.
  
  * Document some of the nastier cache coherency hacks.
  
  Revision  Changes    Path
  1.15      +3 -1      src/usr.sbin/pstat/pstat.c
  1.9       +4 -0      src/sys/vfs/nfs/nfs.h
  1.21      +39 -44    src/sys/vfs/nfs/nfs_bio.c
  1.19      +3 -2      src/sys/vfs/nfs/nfs_node.c
  1.22      +2 -2      src/sys/vfs/nfs/nfs_nqlease.c
  1.27      +75 -21    src/sys/vfs/nfs/nfs_subs.c
  1.25      +2 -2      src/sys/vfs/nfs/nfs_vfsops.c
  1.38      +96 -70    src/sys/vfs/nfs/nfs_vnops.c
  1.7       +21 -4     src/sys/vfs/nfs/nfsm_subs.h
  1.13      +4 -3      src/sys/vfs/nfs/nfsnode.h


http://www.dragonflybsd.org/cvsweb/src/usr.sbin/pstat/pstat.c.diff?r1=1.14&r2=1.15&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nfs/nfs.h.diff?r1=1.8&r2=1.9&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nfs/nfs_bio.c.diff?r1=1.20&r2=1.21&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nfs/nfs_node.c.diff?r1=1.18&r2=1.19&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nfs/nfs_nqlease.c.diff?r1=1.21&r2=1.22&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nfs/nfs_subs.c.diff?r1=1.26&r2=1.27&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nfs/nfs_vfsops.c.diff?r1=1.24&r2=1.25&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nfs/nfs_vnops.c.diff?r1=1.37&r2=1.38&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nfs/nfsm_subs.h.diff?r1=1.6&r2=1.7&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nfs/nfsnode.h.diff?r1=1.12&r2=1.13&f=u





More information about the Commits mailing list