afs: FreeDCache test afs_blocksDiscarded

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: Ic9063280d88eb28d84851cbe6b7e4867a1110659
Reviewed-on: http://gerrit.openafs.org/10232
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
This commit is contained in:
Jeffrey Altman 2013-09-07 12:26:52 -04:00 committed by Derrick Brashear
parent 064558a692
commit aa4f70578e

View 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);