OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-3237-g1cee097

Gerrit Code Review gerrit@openafs.org
Mon, 31 Dec 2012 06:55:30 -0800 (PST)


The following commit has been merged in the master branch:
commit 1cee097b5bf44b0d8273712f0074b541f0f3f96e
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Fri Dec 28 16:39:15 2012 -0500

    afs: Avoid unnecessary panic in ShakeLooseVCaches
    
    afs_vcount can change as we traverse the loop. If we successfully
    evict something from the cache, afs_vcount goes down, but our loop
    variable 'i' stays incremented. For example, if afs_vcount was 100 at
    the start of the loop and we kicked out 50 things, by the time we
    traverse the entire VLRU, we could have iterated over the loop 100
    times, but afs_vcount would still be just at 50.
    
    So, remember what afs_vcount was at the start of the loop, and use
    that for our loop limit. Note that vcaches cannot be added to the VLRU
    during the execution of this loop, since we're just kicking stuff out.
    And nobody else can modify the VLRU but us, since we're holding
    afs_xvcache, and if we drop afs_xvcache, we restart the whole eviction
    process.
    
    The bug here was introduced by commit bc6dd950, but usually did not
    affect Linux until commit 696db866.
    
    FIXES 131553
    
    Change-Id: If30026b5b2101559e704d0e1961effe14beb915f
    Reviewed-on: http://gerrit.openafs.org/8849
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
    Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

 src/afs/afs_vcache.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

-- 
OpenAFS Master Repository