OpenAFS Master Repository branch, openafs-stable-1_4_x, updated. openafs-stable-1_4_12-135-gf37ad24

Gerrit Code Review gerrit@openafs.org
Mon, 23 Jan 2012 07:24:24 -0800 (PST)


The following commit has been merged in the openafs-stable-1_4_x branch:
commit f37ad24995a475884782ff4752ff3b09cf2fb78f
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Tue Feb 15 12:04:32 2011 -0600

    libafs: Drop xvcache for AllocCBR
    
    Normally when we AllocCBR, we are holding xvcache write-locked, since
    it is called from FlushVCache. Before
    a309e274632993c5aeec04c6e090f5ac95837a40, when AllocCBR needs to flush
    CBRs due to a lack of space, we hit the net, giving up callbacks on
    fileservers.
    
    This can cause a problem if one of those fileservers needs to contact
    us in order to complete that request, since the callback service
    thread may be waiting for xvcache, causing a deadlock (that is
    eventually broken by network timeouts).
    
    To avoid this, drop xvcache if AllocCBR looks like it does not have
    sufficient space. Fix all callers of afs_FlushVCache to handle the
    case where we sleep, since with this change, afs_FlushVCache can sleep
    on all platforms.
    
    This partially reverts a309e274632993c5aeec04c6e090f5ac95837a40, as it
    contains an alternative method of avoiding the xvcache lock in this
    situation. This commit restores much of the code path to be much more
    similar to how it used to be, except that it allows for dropping
    xvcache for AllocCBR. This should make any change to our prior
    behavior smaller/simpler, and thus safer and more consistent with
    existing clients. This reintroduces the hard limit to how much space
    we allocate for CBRs, although the part of
    a309e274632993c5aeec04c6e090f5ac95837a40 that raised this limit is
    retained.
    
    Reviewed-on: http://gerrit.openafs.org/3958
    Reviewed-by: Derrick Brashear <shadow@dementia.org>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    (cherry picked from commit 76158df491f47de56d1febe1d1d2d17d316c9a74)
    
    Change-Id: I0b41ff4f1d9f6d81010243720735e72c5686d572
    Reviewed-on: http://gerrit.openafs.org/6593
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Derrick Brashear <shadow@dementix.org>

 src/afs/IRIX/osi_vfsops.c |    7 +++++-
 src/afs/afs.h             |    1 -
 src/afs/afs_call.c        |    2 +-
 src/afs/afs_vcache.c      |   48 +++++++++++++++++++++++++-------------------
 4 files changed, 34 insertions(+), 24 deletions(-)

-- 
OpenAFS Master Repository