OpenAFS Master Repository branch, master, updated. BP--openafs-stable-1_6_x-1149-g76158df
Gerrit Code Review
gerrit@openafs.org
Thu, 28 Apr 2011 21:36:50 -0700 (PDT)
The following commit has been merged in the master branch:
commit 76158df491f47de56d1febe1d1d2d17d316c9a74
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.
Change-Id: Id4aaa941b3908f59390873e83e23429041c0828f
Reviewed-on: http://gerrit.openafs.org/3958
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
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 | 55 +++++++++++++++++++++++++----------------
6 files changed, 49 insertions(+), 27 deletions(-)
--
OpenAFS Master Repository