OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_12pre1-12-g2c95c10

Gerrit Code Review gerrit@openafs.org
Fri, 29 May 2015 03:16:30 -0400


The following commit has been merged in the openafs-stable-1_6_x branch:
commit 2c95c104fd526f99db6237fc49534ad7dd6e92c0
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.
    
    Reviewed-on: http://gerrit.openafs.org/11124
    Reviewed-by: Daria Brashear <shadow@your-file-system.com>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    (cherry picked from commit 95b857399d71cb1f6619e625bff256f8c4c72c6a)
    
    Change-Id: I08ced97c4f58f95375fda2ed9c707cdf7657e493
    Reviewed-on: http://gerrit.openafs.org/11877
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

 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