git: Kernel - Fix issues with vnode_pager_setsize() (effects NFS only)

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Aug 24 16:32:49 PDT 2009


commit c7841cbec4a96ffd7a4d6b4f0b8d3d07f9e278da
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Aug 24 15:37:34 2009 -0700

    Kernel - Fix issues with vnode_pager_setsize() (effects NFS only)
    
    * When truncating a file to non-zero length, if the filesystem calls
      vnode_pager_setsize() with a truncation offset that is not a
      multiple of DEV_BSIZE vnode_pager_setsize() will improperly clear
      the dirty bit for the overlapping DEV_BSIZE'd block in the VM page
      straddling the truncation point.
    
      This only effects NFS.  The fsx filesystem test was failing due to
      a lost dirty page after a truncation.
    
    Reported-by: Antonio Huete Jimenez <tuxillo at quantumachine.net>

Summary of changes:
 sys/kern/kern_slaballoc.c |    4 +++
 sys/kern/kern_subr.c      |   48 +++++++++++++++++++++++++++++++++++++++++++++
 sys/sys/systm.h           |    1 +
 sys/sys/uio.h             |    1 +
 sys/vm/vm_page.c          |    5 ++++
 sys/vm/vnode_pager.c      |   15 ++++++++++++-
 6 files changed, 72 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c7841cbec4a96ffd7a4d6b4f0b8d3d07f9e278da


-- 
DragonFly BSD source repository





More information about the Commits mailing list