cvs commit: src/sys/kern vfs_bio.c vfs_subr.c src/sys/sys buf.h src/sys/vm vnode_pager.c

Matthew Dillon dillon at crater.dragonflybsd.org
Thu May 25 12:37:23 PDT 2006


dillon      2006/05/25 12:31:15 PDT

DragonFly src repository

  Modified files:
    sys/kern             vfs_bio.c vfs_subr.c 
    sys/sys              buf.h 
    sys/vm               vnode_pager.c 
  Log:
  Fix several buffer cache issues related to B_NOCACHE.
  
  * Do not set B_NOCACHE when calling vinvalbuf(... V_SAVE).  This will
    destroy dirty VM backing store associated with clean buffers before
    the VM system has a chance to check for and flush them.
  
    Taken-from: FreeBSD
  
  * Properly set B_NOCACHE when destroying buffers related to truncated data.
  
  * Fix a bug in vnode_pager_setsize() that was recently introduced.
    v_filesize was being set before a new/old size comparison, causing a
    file truncation to not destroy related VM pages past the new EOF.
  
  * Remove a bogus B_NOCACHE|B_DIRTY test in brelse().  This was originally
    intended to be a B_NOCACHE|B_DELWRITE test which then cleared B_NOCACHE,
    but now that B_NOCACHE operation has been fixed it really does indicate that
    the buffer, its contents, and its backing store are to be destroyed, even
    if the buffer is marked B_DELWRI.
  
    Instead of clearing B_NOCACHE when B_DELWRITE is found to be set, clear
    B_DELWRITE when B_NOCACHE is found to be set.
  
    Note that B_NOCACHE is still cleared when bdirty() is called in order to
    ensure that data is not lost when softupdates and other code do a
    'B_NOCACHE + bwrite' sequence.  Softupdates can redirty a buffer in its
    io completion hook and a write error can also redirty a buffer.
  
  * The VMIO buffer rundown seems to have mophed into a state where the
    distinction between NFS and non-NFS buffers can be removed.  Remove
    the test.
  
  Revision  Changes    Path
  1.76      +36 -31    src/sys/kern/vfs_bio.c
  1.87      +19 -7     src/sys/kern/vfs_subr.c
  1.37      +1 -1      src/sys/sys/buf.h
  1.30      +3 -1      src/sys/vm/vnode_pager.c


http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_bio.c.diff?r1=1.75&r2=1.76&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_subr.c.diff?r1=1.86&r2=1.87&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/buf.h.diff?r1=1.36&r2=1.37&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/vnode_pager.c.diff?r1=1.29&r2=1.30&f=u





More information about the Commits mailing list