OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_2pre2-6-g075893f
Gerrit Code Review
gerrit@openafs.org
Thu, 10 Jan 2013 08:03:08 -0800 (PST)
The following commit has been merged in the openafs-stable-1_6_x branch:
commit 075893f250beaf3bb22cebc5fb1f936557cce50c
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
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>
(cherry picked from commit 1cee097b5bf44b0d8273712f0074b541f0f3f96e)
Change-Id: I1bdbe41980e03522905217e55f745a96fb2bdc2d
Reviewed-on: http://gerrit.openafs.org/8867
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/afs_vcache.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
--
OpenAFS Master Repository