]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
afs: FreeDCache test afs_blocksDiscarded
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 7 Sep 2013 16:26:52 +0000 (12:26 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Thu, 14 Nov 2013 13:26:48 +0000 (05:26 -0800)
For consistency with afs_FlushDCache and afs_DiscardDCache
include afs_blocksDiscarded in the free space test.  When afs_FreeDCache
is called it should be zero.

Change-Id: I84a5dea626258c628d24bf647088e2cbfd233c9a
Reviewed-on: http://gerrit.openafs.org/10431
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/afs_dcache.c

index 415b349f1c5bf27c0515e9eb829a136a899d5d3b..fe801fef9573521dd5d732e8337d2ed68ba7e97b 100644 (file)
@@ -989,7 +989,7 @@ afs_FlushDCache(struct dcache *adc)
     }
 
     if (afs_WaitForCacheDrain) {
-       if (afs_blocksUsed <=
+       if ((afs_blocksUsed - afs_blocksDiscarded) <=
            PERCENT(CM_CACHESIZEDRAINEDPCT, afs_cacheBlocks)) {
            afs_WaitForCacheDrain = 0;
            afs_osi_Wakeup(&afs_WaitForCacheDrain);