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

git: kernel - Fix issues where tmpfs loses file data

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 7 Dec 2012 14:25:54 -0800 (PST)

commit d86d27a81d75c46fb451b36f43f87b3300c1a260
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
    * 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(-)


DragonFly BSD source repository

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