OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-4624-g95b8573

Gerrit Code Review gerrit@openafs.org
Tue, 26 May 2015 14:38:19 -0400


The following commit has been merged in the master branch:
commit 95b857399d71cb1f6619e625bff256f8c4c72c6a
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date:   Wed Apr 22 15:06:12 2015 -0300

    Linux: mmap: Apply recursion check only to recursion cases
    
    The CPageWrite flag was originally added to prevent a scenario
    where a thread doing "writepage" would realize that the cache
    was too full and that some of its contents need to be written
    back to the server.  Before writing back it would ask the OS to
    flush any dirty VM associated with the vcache entries that are
    to be written, to make sure the data is not stale.  This flush
    could itself trigger writeback, leading to deadly recursion.
    One such scenario is a process doing mmap writes to a file larger
    than the cache.
    
    With some kernel versions and some callers of writepage, this
    can cause the mapping to be marked as being in an error state,
    leading to EIO errors passed back to user space.
    
    Make the recursion check more specific to only bail when the
    calling thread is one that was originally seen writing.  A list
    of current writers is maintained instead of a single state flag.
    
    This lets other threads (like the flusher thread) go on with
    writeback to the same file, and limits the WRITEPAGE_ACTIVATE
    return case to call sites that can deal with it.
    
    In testing this helps avoid EIO errors when writing large
    chunks of data through mmap.
    
    Thanks to Yadav Yadavendra for extensive analysis and testing.
    
    Change-Id: Ic3136d7050c62e3ffac5e52441171f322b60fe86
    Reviewed-on: http://gerrit.openafs.org/11124
    Reviewed-by: Daria Brashear <shadow@your-file-system.com>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>

 src/afs/LINUX/osi_vcache.c   |    3 ++
 src/afs/LINUX/osi_vm.c       |    2 +-
 src/afs/LINUX/osi_vnodeops.c |   44 ++++++++++++++++++++++++++++++++++++++---
 src/afs/afs.h                |   15 +++++++++++--
 src/afs/afs_vcache.c         |   20 +++++++++++++++++++
 5 files changed, 76 insertions(+), 8 deletions(-)

-- 
OpenAFS Master Repository