OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_0pre4-34-ge69ee66

Gerrit Code Review gerrit@openafs.org
Mon, 2 May 2011 19:21:48 -0700 (PDT)


The following commit has been merged in the openafs-stable-1_6_x branch:
commit e69ee66caf1aa4131e2516d990c3d766a6d060d5
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: I6d2d7512682b93e6524f8f60bb8e15818d888e00
    Reviewed-on: http://gerrit.openafs.org/4603
    Tested-by: Derrick Brashear <shadow@dementia.org>
    Reviewed-by: Derrick Brashear <shadow@dementia.org>

 src/afs/IRIX/osi_vfsops.c    |    7 ++++-
 src/afs/LINUX/osi_vfsops.c   |    6 +++-
 src/afs/LINUX24/osi_vfsops.c |    6 +++-
 src/afs/afs.h                |    1 -
 src/afs/afs_call.c           |    1 -
 src/afs/afs_vcache.c         |   56 +++++++++++++++++++++++++----------------
 6 files changed, 50 insertions(+), 27 deletions(-)

-- 
OpenAFS Master Repository