git: kernel - Try to fix delayed mtime updates on SHARED+RW maps again

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Feb 13 23:07:42 PST 2018


commit fa4a12c408e7819a51670d15087aadbf10659890
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Feb 13 23:02:18 2018 -0800

    kernel - Try to fix delayed mtime updates on SHARED+RW maps again
    
    * Attempt to fix continuing problems with mtime updates related to
      modifications made via SHARED+RW mmap()s.  As evidenced by builds
      under synth sometimes getting confused.
    
    * Don't update vp->v_lastwrite_ts in vop_stdclose().  Instead, update
      the field and set a new flag VLASTWRITETS upon mmap(SHARED+PROT_WRITE)
      or upon mprotect(PROT_WRITE) on a SHARED mmap.
    
    * Clear the flag on any regular write, utimes, or truncation.
    
    * Adjust various filesystems to update mtime from vp->v_lastwrite_ts
      only upon UIO_NOCOPY writes, and only if VLASTWRITETS is set.
    
      tmpfs, ufs, hammer, hammer2 adjusted.

Summary of changes:
 sys/kern/vfs_default.c          |  1 -
 sys/sys/vnode.h                 | 12 ++++--------
 sys/vfs/hammer/hammer_vnops.c   | 16 ++++++++++++----
 sys/vfs/hammer2/hammer2_vnops.c | 18 ++++++++++++------
 sys/vfs/tmpfs/tmpfs.h           | 12 ++++++------
 sys/vfs/tmpfs/tmpfs_subr.c      | 10 +++++++---
 sys/vfs/tmpfs/tmpfs_vnops.c     | 11 +++++++----
 sys/vfs/ufs/inode.h             |  2 +-
 sys/vfs/ufs/ufs_readwrite.c     |  8 ++++++--
 sys/vfs/ufs/ufs_vnops.c         | 16 ++++++++++------
 sys/vm/vm_map.c                 | 20 ++++++++++++++++++++
 sys/vm/vm_mmap.c                | 13 +++++++++++++
 12 files changed, 98 insertions(+), 41 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fa4a12c408e7819a51670d15087aadbf10659890


-- 
DragonFly BSD source repository


More information about the Commits mailing list