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>
}
if (afs_WaitForCacheDrain) {
- if (afs_blocksUsed <=
+ if ((afs_blocksUsed - afs_blocksDiscarded) <=
PERCENT(CM_CACHESIZEDRAINEDPCT, afs_cacheBlocks)) {
afs_WaitForCacheDrain = 0;
afs_osi_Wakeup(&afs_WaitForCacheDrain);