DragonFly BSD
DragonFly commits List (threaded) for 2006-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 16 May 2006 11:20:32 -0700 (PDT)

dillon      2006/05/16 11:20:32 PDT

DragonFly src repository

  Modified files:
    sys/kern             vfs_subr.c 
    sys/vm               vnode_pager.c 
  Log:
  Attempt to interlock races between the buffer cache and VM backing store
  that might cause new buffers to be instantiated beyond the new file EOF
  during a truncate operation.
  
  Truncate the VM object size before attempting to flush the pages and buffers
  in order to prevent new VM pages from being created beyond EOF during the
  flush.  Add an extra pass on the buffer cache after truncation to make sure
  the buffers have been cleaned out.  Generate a warning to the console if
  buffers are found during the extra pass.
  
  If an old buffer were left intact during a truncate, then a re-extension of
  the file or directory could have resulted in granting access to the old
  buffer which might have had an incorrect cached block number translation
  (vs the new block allocated by the extension of the file or directory),
  causing new data to be written to the wrong disk block and resulting in
  file or directory corruption.  The regular file truncation/extension
  code had other checks in it prior to this patch so if this problem could
  occur at all before it would have been in the directory code.
  
  There is a small chance that this race was related to reported
  ufs: dirbad panics.  The M.O. matches but unfortunately there is still
  no smoking gun.
  
  Revision  Changes    Path
  1.86      +34 -4     src/sys/kern/vfs_subr.c
  1.28      +13 -6     src/sys/vm/vnode_pager.c


http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_subr.c.diff?r1=1.85&r2=1.86&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/vnode_pager.c.diff?r1=1.27&r2=1.28&f=u



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]