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

git: DragonFly_RELEASE_3_2 kernel - Fix issues where tmpfs loses file data


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 Dec 2012 19:17:30 -0800 (PST)

commit 86340e059ccde828c4146f19c52723140ae4aa13
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Fri Dec 7 14:20:31 2012 -0800

    kernel - Fix issues where tmpfs loses file data
    
    * For TMPFS, UIO_NOCOPY writes must use bawrite() or bwrite() and must NEVER
      used buwrite() because these operations are being called via the VM page
      cleaning code via the pageout daemon or the vnode termination code
      (when maxvnodes is reached), and the underlying pages are about to be
      destroyed.
    
    * vm_object_terminate() must call vinvalbuf() both before (for normal
      filesystems) and also after (for tmpfs style filesystems).  Otherwise
      buffers potentially not disposed of during the page cleaning might
      get left hanging.  This is a safety feature.
    
    * Remove post-flush test code from vm_object_page_collect_flush() entirely.
      The IO's are in progress at this point so it makes no sense to set
      PG_CLEANCHK here.
    
    * vm_page_need_commit() must make the object writeable and dirty, I think.
    
    * Fix multiple places where m->dirty is tested and PG_NEED_COMMIT is not.
    
    Reported-by: vsrinivas, others

Summary of changes:
 sys/vfs/tmpfs/tmpfs_subr.c  |    2 +-
 sys/vfs/tmpfs/tmpfs_vnops.c |   22 +++++++++-------
 sys/vm/vm_object.c          |   57 ++++++++++++++++++-------------------------
 sys/vm/vm_page.c            |   10 ++++---
 4 files changed, 43 insertions(+), 48 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/86340e059ccde828c4146f19c52723140ae4aa13


-- 
DragonFly BSD source repository



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