Kernel - Fix issues with vnode_pager_setsize() (effects NFS only)
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 24 Aug 2009 22:37:34 +0000 (15:37 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 24 Aug 2009 22:37:34 +0000 (15:37 -0700)
commitc7841cbec4a96ffd7a4d6b4f0b8d3d07f9e278da
tree18c4805d8adc3e6d5c02423c0ef20ca470402621
parent265af2b54936238e8f201fc1766f2b148fe7cbf2
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@quantumachine.net>
sys/kern/kern_slaballoc.c
sys/kern/kern_subr.c
sys/sys/systm.h
sys/sys/uio.h
sys/vm/vm_page.c
sys/vm/vnode_pager.c