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

git: kernel - Fix issue in UFS related to new nvtruncbuf() API use


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 29 Jan 2010 11:00:03 -0800 (PST)

commit 09327129c8183ca84176e5c2c5c21a2d1638edd6
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Fri Jan 29 10:55:34 2010 -0800

    kernel - Fix issue in UFS related to new nvtruncbuf() API use
    
    * When a UFS truncation must downsize a block it must sometimes call
      FSYNC twice, the second time to flush out softdep block dependencies
      related to the original indirect block.
    
      UFS depends on the first FSYNC call to prevent the buffer cache buffer
      straddling the new file/directory EOF from becoming dirty.  However,
      nvtruncbuf() defeats this by re-dirtying the bp.
    
      The solution is to simply undirty the bp prior to the second FSYNC,
      which works fine since it will be written out later with a b*write()
      anyway.
    
    * Fixes 'locking against myself' panic w/UFS.
    
    Reported-by: Stathis Kamperis <ekamperi@gmail.com>

Summary of changes:
 sys/vfs/ufs/ffs_inode.c |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/09327129c8183ca84176e5c2c5c21a2d1638edd6


-- 
DragonFly BSD source repository



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